login
A033101
Number of 4's when n is written in base b for 2<=b<=n+1.
10
0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 3, 2, 4, 2, 5, 3, 3, 2, 6, 4, 3, 3, 5, 3, 7, 2, 5, 4, 4, 5, 7, 3, 4, 4, 8, 4, 8, 4, 7, 8, 4, 3, 9, 5, 7, 4, 6, 4, 8, 6, 9, 6, 6, 5, 13, 5, 5, 7, 8, 7, 9, 5, 8, 7, 11, 4, 12, 6, 7, 9, 8, 8, 10, 6, 12, 7, 6, 5, 13
OFFSET
1,14
MATHEMATICA
f[n_] := Count[Flatten@ Table[ IntegerDigits[n, b], {b, 2, n + 1}], 4]; Array[f, 88] (* Robert G. Wilson v, Nov 14 2012 *)
KEYWORD
nonn,base
STATUS
approved