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.

Showing 1-10 of 11 results. Next

A090579 Number of numbers with 4 decimal digits and sum of digits = n.

Original entry on oeis.org

1, 4, 10, 20, 35, 56, 84, 120, 165, 219, 279, 342, 405, 465, 519, 564, 597, 615, 615, 597, 564, 519, 465, 405, 342, 279, 219, 165, 120, 84, 56, 35, 20, 10, 4, 1
Offset: 1

Views

Author

Hugo Pfoertner, Jan 12 2004

Keywords

Comments

There are 9000 numbers with 4 decimal digits, the smallest being 1000 and the largest 9999.

Examples

			a(2)=4: 1001, 1010, 1100, 2000.
		

Crossrefs

Cf. A071817 3-digit numbers, A090580 5-digit numbers, A090581 6-digit numbers.

Programs

  • Mathematica
    nn=36;Drop[CoefficientList[Series[(x-x^10)/(1-x)(1-x^10)^3/(1-x)^3,{x,0,nn}],x],1] (* Geoffrey Critzer, Feb 09 2014 *)
  • PARI
    b=vector(36,i,0);for(n=1000,9999,a=eval(Vec(Str(n)));b[sum(j=1,4,a[j])]++);for(n=1,36,print1(b[n],",")) - Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 19 2006

Formula

G.f.: (x-x^10)/(1-x)*((1-x^10)/(1-x))^3. - Geoffrey Critzer, Feb 09 2014

A090580 Number of numbers with 5 decimal digits and sum of digits = n.

Original entry on oeis.org

1, 5, 15, 35, 70, 126, 210, 330, 495, 714, 992, 1330, 1725, 2170, 2654, 3162, 3675, 4170, 4620, 4998, 5283, 5460, 5520, 5460, 5283, 4998, 4620, 4170, 3675, 3162, 2654, 2170, 1725, 1330, 992, 714, 495, 330, 210, 126, 70, 35, 15, 5, 1
Offset: 1

Views

Author

Hugo Pfoertner, Jan 12 2004

Keywords

Comments

There are 90000 numbers with 5 decimal digits, the smallest being 10000 and the largest 99999.

Examples

			a(2)=5: 10001, 10010, 10100, 11000, 20000.
		

Crossrefs

Cf. A071817 3-digit numbers, A090579 4-digit numbers, A090581 6-digit numbers.

Programs

  • Mathematica
    Rest@ CoefficientList[Series[(x - x^10)/(1 - x) ((1 - x^10)/(1 - x))^4, {x, 0, 45}], x] (* or *)
    Function[w, Count[w, #] & /@ Range[Max@ w]]@ Map[Total@ IntegerDigits@ # &, Range[10^#, 10^(# + 1) - 1]] &@ 4 (* Michael De Vlieger, Dec 07 2016 *)
    Tally[Total[IntegerDigits[#]]&/@Range[10000,99999]][[All,2]] (* Harvey P. Dale, Jul 08 2019 *)
  • PARI
    b=vector(45,i,0);for(n=10000,99999,a=eval(Vec(Str(n)));b[sum(j=1,5,a[j])]++);for(n=1,45,print1(b[n],",")) - Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 19 2006

Formula

G.f.: (x - x^10)/(1 - x)*((1 - x^10)/(1 - x))^4. - Michael De Vlieger, Dec 07 2016

A090581 Number of numbers with 6 decimal digits and sum of digits = n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Hugo Pfoertner, Jan 12 2004

Keywords

Comments

There are 900000 6-digit numbers, the smallest being 100000 and the largest 999999.

Examples

			a(2)=6: 100001, 100010, 100100, 101000, 110000, 200000.
		

Crossrefs

Cf. A071817 3-digit numbers, A090579 4-digit numbers, A090580 5-digit numbers.

Programs

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

Formula

G.f.: (x - x^10)/(1 - x)*((1 - x^10)/(1 - x))^5. - Michael De Vlieger, Dec 07 2016

A071816 Number of ordered solutions to x+y+z = u+v+w, 0 <= x, y, z, u, v, w < n.

Original entry on oeis.org

1, 20, 141, 580, 1751, 4332, 9331, 18152, 32661, 55252, 88913, 137292, 204763, 296492, 418503, 577744, 782153, 1040724, 1363573, 1762004, 2248575, 2837164, 3543035, 4382904, 5375005, 6539156, 7896825, 9471196, 11287235, 13371756
Offset: 1

Views

Author

Graeme McRae, Jun 07 2002

Keywords

Comments

Number of 6-digit numbers in base n (with leading zeros allowed) such that the sum of the first three digits equals the sum of the last three digits.
a(n) = largest coefficient of (1+...+x^(n-1))^6. - R. H. Hardin, Jul 23 2009

Examples

			For n = 2 there are 20 ordered solutions (x,y,z,u,v,w) to x+y+z = u+v+w: (0,0,0,0,0,0), (0,0,1,0,0,1), (0,0,1,0,1,0), (0,0,1,1,0,0), (0,1,0,0,0,1), (0,1,0,0,1,0), (0,1,0,1,0,0), (0,1,1,0,1,1), (0,1,1,1,0,1), (0,1,1,1,1,0), (1,0,0,0,0,1), (1,0,0,0,1,0), (1,0,0,1,0,0), (1,0,1,0,1,1), (1,0,1,1,0,1), (1,0,1,1,1,0), (1,1,0,0,1,1), (1,1,0,1,0,1), (1,1,0,1,1,0), (1,1,1,1,1,1).
		

Crossrefs

First differences are in A070302.

Programs

Formula

The sum of the squares of the number of different 3-digit numbers that add up to k (summed over all possible k's) - cf. A071817.
a(n) = A077042(n,6).
a(n) = n*(11*n^4+5*n^2+4)/20. Recurrence: a(n) = 6*a(n-1)-15*a(n-2)+20*a(n-3)-15*a(n-4)+6*a(n-5)-a(n-6). G.f.: x*(1+14*x+36*x^2+14*x^3+x^4)/(1-x)^6. - Vladeta Jovovic, Jun 09 2002

Extensions

New definition from Vladeta Jovovic, Jun 09 2002
Comment revised by Franklin T. Adams-Watters, Jul 27 2009
Edited by N. J. A. Sloane, Jul 28 2009

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

A278971 Number of 8-digit numbers whose sum of digits is n.

Original entry on oeis.org

1, 8, 36, 120, 330, 792, 1716, 3432, 6435, 11439, 19433, 31732, 50016, 76350, 113178, 163284, 229713, 315645, 424215, 558279, 720147, 911304, 1132140, 1381710, 1657545, 1955535, 2269905, 2593305, 2917035, 3231405, 3526195, 3791180, 4016685, 4194135, 4316565, 4379055, 4379055, 4316565, 4194135, 4016685, 3791180, 3526195, 3231405, 2917035, 2593305, 2269905, 1955535, 1657545, 1381710, 1132140, 911304, 720147, 558279, 424215, 315645, 229713, 163284, 113178, 76350, 50016, 31732, 19433, 11439, 6435, 3432, 1716, 792, 330, 120, 36, 8, 1
Offset: 1

Views

Author

Daniel Mondot, Dec 02 2016

Keywords

Comments

There are 90000000 numbers with 8 decimal digits, the smallest being 10000000 and the largest 99999999.

Examples

			a(2)=8: 10000001, 10000010, 10000100, 10001000, 10010000, 10100000, 11000000, 20000000.
		

Crossrefs

Cf. A071817 (3-digit numbers), A090579 (4-digit numbers), A090580 (5-digit numbers), A090581 (6-digit numbers), A278969 (7-digit numbers).

Programs

  • 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 *)
  • 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], ", "))

Formula

G.f.: (x - x^10)/(1 - x)*((1 - x^10)/(1 - x))^7. - Michael De Vlieger, Dec 07 2016

A289354 Number of 9-digit numbers whose sum of digits is n.

Original entry on oeis.org

1, 9, 45, 165, 495, 1287, 3003, 6435, 12870, 24309, 43741, 75465, 125445, 201675, 314523, 477015, 705012, 1017225, 1435005, 1981845, 2682559, 3562131, 4644255, 5949615, 7493982, 9286233, 11326425, 13604085, 16096905, 18770031, 21576079, 24455955, 27340500, 30152925, 32811945, 35235465, 37344615, 39067875, 40344975, 41130255, 41395240, 41130255, 40344975, 39067875, 37344615, 35235465, 32811945, 30152925, 27340500, 24455955, 21576079, 18770031, 16096905, 13604085, 11326425, 9286233, 7493982, 5949615, 4644255, 3562131, 2682559, 1981845, 1435005, 1017225, 705012, 477015, 314523, 201675, 125445, 75465, 43741, 24309, 12870, 6432, 3003, 1287, 495, 165, 45, 9, 1
Offset: 1

Views

Author

Miquel Cerda, Jul 03 2017

Keywords

Comments

There are 900000000 numbers with 9 decimal digits, the smallest being 100000000 and the largest 999999999.

Examples

			a(2)=9: 100000001, 100000010, 100000100, 100001000, 100010000, 100100000, 101000000, 11000000, 20000000.
		

Crossrefs

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

Programs

  • Mathematica
    With[{d = 9}, Rest@ CoefficientList[Series[(x - x^10)/(1 - x) ((1 - x^10)/(1 - x))^(d - 1), {x, 0, 9 d}], x]] (* Michael De Vlieger, Jul 04 2017 *)

Formula

a(n) = a(82 - n). - David A. Corneth, Jul 03 2017
G.f.: (x - x^10)/(1 - x)*((1 - x^10)/(1 - x))^8 - Michael De Vlieger, Jul 04 2017

A289410 Irregular triangular array T(m,k) with m (row) >= 1 and k (column) >= 1 read by rows: number of m-digit numbers whose digit sum is k.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 8, 7, 6, 5, 4, 3, 2, 1, 1, 3, 6, 10, 15, 21, 28, 36, 45, 54, 61, 66, 69, 70, 69, 66, 61, 54, 45, 36, 28, 21, 15, 10, 6, 3, 1, 1, 4, 10, 20, 35, 56, 84, 120, 165, 219, 279, 342, 405, 465, 519, 564, 597, 615, 615, 597, 564, 519, 465, 405, 342, 279, 219, 165, 120, 84
Offset: 1

Views

Author

Miquel Cerda, Jul 05 2017

Keywords

Comments

The m-th row is palindromic; T(m,k) = T(m,9*m+1-k).

Examples

			The irregular triangle T(m,k) begins:
m\k  1  2  3  4  5   6   7   8   9   10   11  12   13   14  15  16  17  18  19
1    1  1  1  1  1   1   1   1   1;
2    1  2  3  4  5   6   7   8   9    9    8   7    6    5   4   3   2   1;
3    1  3  6  10 15  21  28  36  45   54   61  66   69   70  69  66  61  54 45,...;
4    1  4  10 20 35  56  84  120 165  219  279 342  405  465,...;
5    1  5  15 35 70  126 210 330 495  714  992 1330 1725,...;
6    1  6  21 56 126 252 462 792 1287 2001 2992,...;
etc.
Row m(2), column k(4) there are 4 numbers of 2-digits whose digits sum = 4: 13, 22, 31, 40.
		

Crossrefs

The row sums = 9*10^(m-1) = A052268(n). The row lengths = 9*m = A008591(n). The middle diagonal = A071976. (row m=3) = A071817, (row m=4) = A090579, (row m=5) = A090580, (row m=6) = A090581, (row m=7) = A278969, (row m=8) = A278971, (row m=9) = A289354, (column k=3) = A000217, (column k=4) = A000292, (column k=5) = A000332, (column k=6) = A000389, (column k=7) = A000579, (column k=8) = A000580, (column k=9) = A000581, (column k=10) = A035927.

Programs

  • Maple
    row:= proc(m) local g; g:= normal((1 - x^10)^(m-1)*(x - x^10)/(1 - x)^m);
    seq(coeff(g,x,j),j=1..9*m) end proc:
    seq(row(k),k=1..5); # Robert Israel, Jul 19 2017

Formula

G.f. of row m: (1 - x^10)^(m-1)*(x - x^10)/(1 - x)^m.
G.f. as array: (1+x+x^2)*(1+x^3+x^6)*x*y/(1-y*(1+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9)). - Robert Israel, Jul 19 2017

Extensions

Edited by Robert Israel, Jul 19 2017

A289380 Number of 10-digit numbers whose sum of digits is n.

Original entry on oeis.org

1, 10, 55, 220, 715, 2002, 5005, 11440, 24310, 48619, 92359, 167815, 293215, 494725, 808753, 1284481, 1986490, 2997280, 4419415, 6376951, 9015769, 12502435, 17021245, 22769185, 29948644, 38757862, 49379275, 61966135, 76628035, 93416221, 112309741, 133203565, 155899810, 180103120
Offset: 1

Views

Author

Miquel Cerda, Jul 04 2017

Keywords

Comments

The 10-digit numbers distributed according to the sum of their digits n.
The sequence is symmetrical; a(n) = a(91 - n), 1 <= n <= 91.

Examples

			a(2)=10: 1000000001, 1000000010, 1000000100, 1000001000, 1000010000, 1000100000, 1001000000, 1010000000, 110000000, 200000000.
		

Crossrefs

Cf. A071817 (3-digit numbers), A090579 (4-digit numbers), A090580 (5-digit numbers), A090581 (6-digit numbers), A278969 (7-digit numbers), A278971 (8-digit numbers), A289354 (9-digit numbers).

Programs

  • Mathematica
    CoefficientList[Series[(1 - x^10)^9*(1 - x^9)/(1 - x)^10, {x, 0, 40}],
    x] (* Wesley Ivan Hurt, Jul 09 2017 *)

Formula

G.f.: (1 - x^10)^9*(x - x^10)/(1 - x)^10.

A382531 Number of n-digit base-10 numbers whose digit sum is equal to ceiling(9*n/2).

Original entry on oeis.org

1, 9, 70, 615, 5520, 50412, 468448, 4379055, 41395240, 392406145, 3748943890, 35866068766, 345143007910, 3323483518810, 32150758083580, 311088525668335, 3021445494584902, 29344719005694973, 285904843977651598, 2785022004925340460, 27203012941819689340
Offset: 1

Views

Author

Miquel Cerda, Mar 30 2025

Keywords

Comments

Digit sum ceiling(9*n/2) = A130877(n+1) has highest frequency among all n-digit base-10 numbers.
The count excludes numbers with leading zeros.

Examples

			a(2) = 9, the 2-digit numbers with digit sum 9 are: 18, 27, 36, 45, 54, 63, 72, 81, 90.
		

Crossrefs

Cf. A210736 (analogous for base-2 digits).
Cf. A025015 (maximal coefficient of (1+...+x^9)^n).

Programs

  • Maple
    b:= proc(n, s, t) option remember; `if`(9*n b(n, ceil(9*n/2), 1):
    seq(a(n), n=1..23);  # Alois P. Heinz, Apr 12 2025

Formula

a(n) = [x^ceiling(9*n/2)] (f^n - f^(n-1)) with f = (x^10-1)/(x-1). - Alois P. Heinz, Apr 12 2025
Showing 1-10 of 11 results. Next