The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A090581 Number of numbers with 6 decimal digits and sum of digits = n. 8
1, 6, 21, 56, 126, 252, 462, 792, 1287, 2001, 2992, 4317, 6027, 8162, 10746, 13782, 17247, 21087, 25212, 29496, 33787, 37917, 41712, 45002, 47631, 49467, 50412, 50412, 49467, 47631, 45002, 41712, 37917, 33787, 29496, 25212, 21087, 17247, 13782, 10746, 8162, 6027, 4317, 2992, 2001, 1287, 792, 462, 252, 126, 56, 21, 6, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
There are 900000 6-digit numbers, the smallest being 100000 and the largest 999999.
LINKS
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
Cf. A071817 3-digit numbers, A090579 4-digit numbers, A090580 5-digit numbers.
Sequence in context: A008488 A023031 A341203 * A000389 A143980 A140228
KEYWORD
base,fini,full,nonn
AUTHOR
Hugo Pfoertner, Jan 12 2004
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 20:39 EDT 2024. Contains 372533 sequences. (Running on oeis4.)