OFFSET
1,2
COMMENTS
There are 90000000 numbers with 8 decimal digits, the smallest being 10000000 and the largest 99999999.
FORMULA
G.f.: (x - x^10)/(1 - x)*((1 - x^10)/(1 - x))^7. - Michael De Vlieger, Dec 07 2016
EXAMPLE
a(2)=8: 10000001, 10000010, 10000100, 10001000, 10010000, 10100000, 11000000, 20000000.
MATHEMATICA
Rest@ CoefficientList[Series[(x - x^10)/(1 - x) ((1 - x^10)/(1 - x))^#, {x, 0, 9 (# + 1)}], x] &@ 7 (* Michael De Vlieger, Dec 07 2016 *)
PROG
(PARI) b=vector(72, i, 0); for(n=10000000, 99999999, a=eval(Vec(Str(n))); b[sum(j=1, 8, a[j])]++); for(n=1, 72, print1(b[n], ", "))
CROSSREFS
KEYWORD
base,fini,full,nonn,easy
AUTHOR
Daniel Mondot, Dec 02 2016
STATUS
approved