OFFSET
1,2
COMMENTS
There are 900000 6-digit numbers, the smallest being 100000 and the largest 999999.
FORMULA
G.f.: (x - x^10)/(1 - x)*((1 - x^10)/(1 - x))^5. - Michael De Vlieger, Dec 07 2016
EXAMPLE
a(2)=6: 100001, 100010, 100100, 101000, 110000, 200000.
MATHEMATICA
Rest@ CoefficientList[Series[(x - x^10)/(1 - x) ((1 - x^10)/(1 - x))^#, {x, 0, 9 (# + 1)}], x] &@ 5 (* or *)
Function[w, Count[w, #] & /@ Range[Max@ w]]@ Map[Total@ IntegerDigits@ # &, Range[10^#, 10^(# + 1) - 1]] &@ 5 (* Michael De Vlieger, Dec 07 2016 *)
PROG
(PARI) b=vector(54, i, 0); for(n=100000, 999999, a=eval(Vec(Str(n))); b[sum(j=1, 6, a[j])]++); for(n=1, 54, print1(b[n], ", ")) - Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 19 2006
CROSSREFS
KEYWORD
base,fini,full,nonn
AUTHOR
Hugo Pfoertner, Jan 12 2004
STATUS
approved