OFFSET
1,2
COMMENTS
There are 9000000 numbers with 7 decimal digits, the smallest being 1000000 and the largest 9999999.
Differs for n >= 10 (5004 vs 5005) from A000579(n+5) = binomial(n+5,6). - M. F. Hasler, Mar 05 2017
FORMULA
G.f.: (x - x^10)/(1 - x)*((1 - x^10)/(1 - x))^6. - Michael De Vlieger, Dec 07 2016
a(64-n) = a(n), 1 <= n <= 63. - M. F. Hasler, Mar 05 2017
EXAMPLE
a(2)=7: 1000001, 1000010, 1000100, 1001000, 1010000, 1100000, 2000000.
MATHEMATICA
Rest@ CoefficientList[Series[(x - x^10)/(1 - x) ((1 - x^10)/(1 - x))^#, {x, 0, 9 (# + 1)}], x] &@ 6 (* or *)
Function[w, Count[w, #] & /@ Range[Max@ w]]@ Map[Total@ IntegerDigits@ # &, Range[10^#, 10^(# + 1) - 1]] &@ 6 (* Michael De Vlieger, Dec 07 2016 *)
PROG
(PARI) b=vector(63, i, 0); for(n=1000000, 9999999, a=eval(Vec(Str(n))); b[sum(j=1, 7, a[j])]++); for(n=1, 63, print1(b[n], ", "))
(PARI) Vec((1-x^9)*(1-x^10)^6/(1-x)^7) \\ shorter than (1-x^9)/(1-x)*((1-x^10)/(1-x))^6, but not better. - M. F. Hasler, Mar 05 2017
CROSSREFS
KEYWORD
base,fini,full,nonn,easy
AUTHOR
Daniel Mondot, Dec 02 2016
STATUS
approved