login
A033112
Number of 9's when k is written in base b for all b and k satisfying 2<=b<=n+1, 1<=k<=n.
10
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 16, 17, 19, 20, 22, 23, 25, 26, 29, 30, 32, 34, 36, 37, 40, 41, 43, 45, 48, 49, 52, 53, 56, 58, 60, 61, 65, 66, 69, 71, 74, 75, 78, 80, 83, 85, 87, 88, 94
OFFSET
1,19
MATHEMATICA
f[n_] := Count[ Flatten@ Table[ IntegerDigits[k, b], {k, n}, {b, 2, n + 1}], 9] - (n - 9); f[1] = f[2] = f[3] = f[4] = f[5] = f[6] = f[7] = f[8] = 0; Array[f, 69] (* Robert G. Wilson v, Nov 14 2012 *)
KEYWORD
nonn,base
STATUS
approved