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