login
A033095
Number of 1's when n is written in base b for 2<=b<=n+1.
10
1, 1, 3, 4, 6, 6, 9, 6, 10, 10, 12, 11, 16, 13, 15, 14, 16, 13, 18, 15, 21, 20, 21, 16, 24, 20, 23, 23, 26, 25, 32, 22, 26, 25, 25, 28, 34, 28, 32, 30, 35, 30, 37, 31, 35, 36, 35, 31, 41, 34, 37, 36, 39, 35, 43, 38, 44, 41, 42, 38, 49, 40, 43
OFFSET
1,3
FORMULA
G.f.: x+(Sum_{b>=2} (Sum_{k>=0} x^(b^k)/(Sum_{0<=i<b} x^(i*b^k)))/(1-x) - x). If the initial term was 0, the initial "x+" would not be needed. This value is rather arbitrary; changing the "n+1" in the definition to "n" would make it 0. - Franklin T. Adams-Watters, Nov 03 2005
MATHEMATICA
f[n_] := Count[Flatten@ Table[ IntegerDigits[n, b], {b, 2, n + 1}], 1]; Array[f, 63] (* Robert G. Wilson v, Nov 14 2012 *)
KEYWORD
nonn,base
STATUS
approved