login
A033096
Number of 1's when k is written in base b for all b and k satisfying 2<=b<=n+1, 1<=k<=n.
10
1, 2, 5, 9, 15, 21, 30, 36, 46, 56, 68, 79, 95, 108, 123, 137, 153, 166, 184, 199, 220, 240, 261, 277, 301, 321, 344, 367, 393, 418, 450, 472, 498, 523, 548, 576, 610, 638, 670, 700, 735, 765, 802, 833, 868, 904, 939, 970, 1011, 1045
OFFSET
1,2
MATHEMATICA
f[n_] := Count[ Flatten@ Table[ IntegerDigits[k, b], {k, n}, {b, 2, n + 1}], 1] - (n - 1); Array[f, 50] (* Robert G. Wilson v, Nov 14 2012 *)
KEYWORD
nonn,base
STATUS
approved