login
A033108
Number of 7'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, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 17, 18, 20, 21, 24, 25, 27, 29, 31, 32, 35, 36, 39, 41, 43, 44, 48, 49, 51, 53, 57, 58, 61, 62, 65, 68, 70, 71, 76, 78, 82, 85, 89, 91, 96, 99, 105, 108, 111, 113, 120
OFFSET
1,15
MATHEMATICA
f[n_] := Count[ Flatten@ Table[ IntegerDigits[k, b], {k, n}, {b, 2, n + 1}], 7] - (n - 7); f[1] = f[2] = f[3] = f[4] = f[5] = f[6] = 0; Array[f, 67] (* Robert G. Wilson v, Nov 14 2012 *)
KEYWORD
nonn,base
STATUS
approved