For a positive integer n, let k(n) be the product of the digits of n when written in base 4. Find the number of integers n between 1 and 256 inclusive, such that k(n) > 0 and k(n) is divisible by 4.
I counted the case of 2 digits, 3 digits and 4 digits. Since the number's digit can only be 3 or below, there must exist two 2s in the digit. For 2 digit number, we have 22. For 3 digit number, we have 22(1/3/0) and it can be re-arranged to obtain 8 possibilities(note 022 is not a 3 digit number. ) Also 222 is one possible digit so we have 9 possiblities in toatl. For case of 222a, we have 11 cses in total. For case when it is 4 digit number, we have 22(1/3/0)(1/3/0). Counting separately for 22aa and 22ab, we have $(4C2)*3$ possibilities, which we minus 3 since 0202, 0220, 0022 is not possible . For 22ab, we have $(4C2)*3*2$ giving us 36 possible arrangement. However we need to minus case of 022(1/3) since it is not possible to obtain. Then we have 30 case of 22ab. 2222 also counts as one. Adding them we get 68. Is that correct?