cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A278969 Number of 7-digit numbers whose sum of digits is n.

Original entry on oeis.org

1, 7, 28, 84, 210, 462, 924, 1716, 3003, 5004, 7995, 12306, 18312, 26418, 37038, 50568, 67353, 87648, 111573, 139068, 169863, 203463, 239148, 275988, 312873, 348558, 381723, 411048, 435303, 453438, 464653, 468448, 464653, 453438, 435303, 411048, 381723, 348558, 312873, 275988, 239148, 203463, 169863, 139068, 111573, 87648, 67353, 50568, 37038, 26418, 18312, 12306, 7995, 5004, 3003, 1716, 924, 462, 210, 84, 28, 7, 1
Offset: 1

Views

Author

Daniel Mondot, Dec 02 2016

Keywords

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

Examples

			a(2)=7: 1000001, 1000010, 1000100, 1001000, 1010000, 1100000, 2000000.
		

Crossrefs

A071817 (3-digit numbers), A090579 (4-digit numbers), A090580 (5-digit numbers), A090581 (6-digit numbers), A278971 (8-digit numbers).

Programs

  • 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 *)
  • 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

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