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-7 of 7 results.

A328348 Let S be any integer in the range 3 <= S <= 17. Sequence has the property that a(n)*S is the sum of all positive integers whose decimal expansion has <= n digits and contains at most two distinct nonzero digits p and q such that p+q=S.

Original entry on oeis.org

0, 1, 23, 467, 9355, 187131, 3742683, 74853787, 1497075995, 29941520411, 598830409243, 11976608186907, 239532163742235, 4790643274852891, 95812865497074203, 1916257309941516827, 38325146198830402075, 766502923976608172571, 15330058479532163713563, 306601169590643274795547
Offset: 0

Views

Author

Pierre-Alain Sallard, Oct 13 2019

Keywords

Comments

This sequence is the building block for the calculation of the sums of positive integers whose decimal notation only uses two distinct, nonzero digits. See the attached pdf document.

Examples

			For n=3, the sum of all positive integers whose decimal expansion contains only the digits 5 and 8 (then S=5+8=13) with at most n=3 such digits, i.e., the sum 5 + 8 + 55 + 58 + 85 + 88 + 555 + 558 + 585 + 588 + 855 + 858 + 885 + 888, is equal to a(3)*13=6071.
The formula is valid for any other choice of two distinct digits. Other examples: always with n=3 but let's say with the 2 and 3 digits (then S=2+3=5), the sum 2+3+22+23+32+33+222+223+232+233+322+323+332+333 is equal to a(3)*5=2335.
Or with the 6 and 7 digits (and which case S=6+7 is the same as with the 5 and 8 digits), the sum 6+7+66+67+...+776+777 is equal to a(3)*13=6071 (same sum as with the 5 and 8 digits).
		

Crossrefs

Programs

  • Python
    [(10*20**n-19*2**n+9)/(9*19) for n in range(20)]

Formula

a(n) = (10*20^n - 19*2^n + 9)/171.
From Stefano Spezia, Oct 15 2019: (Start)
G.f.: x/(1 - 23*x + 62*x^2 - 40*x^3).
E.g.f.: (1/171)*exp(x)*(9 - 19*exp(x) + 10*exp(19*x)).
a(n) = 23*a(n-1) - 62*a(n-2) + 40*a(n-3) for n > 2.
(End)
a(n) = 21*a(n-1) - 20*a(n-2) + 2^(n-1) for n > 1. - Pierre-Alain Sallard, Dec 10 2019

A328350 Let S be any integer in the range 6 <= S <= 24. Sequence has the property that a(n)*S is the sum of all positive integers whose decimal expansion has <= n digits and contains at most three distinct nonzero digits d1, d2, d3 such that d1+d2+d3 = S.

Original entry on oeis.org

0, 1, 34, 1033, 31030, 931021, 27930994, 837930913, 25137930670, 754137929941, 22624137927754, 678724137921193, 20361724137901510, 610851724137842461, 18325551724137665314, 549766551724137133873, 16492996551724135539550, 494789896551724130756581, 14843696896551724116407674, 445310906896551724073360953
Offset: 0

Views

Author

Pierre-Alain Sallard, Oct 13 2019

Keywords

Comments

This sequence is the building block for the calculation of the sums of positive integers whose decimal expansion contains only three distinct, nonzero digits: see attached pdf document.

Examples

			For n=2, the sum of all positive integers whose decimal expansions consist of at most n=2 of the digits 5, 6 or 7, i.e., the sum 5+6+7+55+56+57+65+66+67+75+76+77, is equal to a(2)*(5+6+7) = 612.
The formula is valid for any other choice of three distinct digits. Another example: again with n=2, but let's say with the digits 1, 2 and 3, the sum 1+2+3+11+12+13+21+22+23+31+32+33 is equal to a(2)*(1+2+3) = 204.
		

Crossrefs

Programs

  • Mathematica
    Array[(20*30^# - 29*3^# + 9)/522 &, 20, 0] (* or *)
    LinearRecurrence[{34, -123, 90}, {0, 1, 34}, 20] (* Paolo Xausa, Apr 29 2024 *)
  • Python
    [(20*30**n-29*3**n+9)//522 for n in range(20)]

Formula

a(n) = (20*30^n - 29*3^n + 9)/522.
From Stefano Spezia, Oct 17 2019: (Start)
O.g.f.: x/(1 - 34*x + 123*x^2 - 90*x^3).
E.g.f.: (1/522)*(9*exp(x) - 29*exp(3*x) + 20*exp(30*x)).
a(n) = 34*a(n-1) - 123*a(n-2) + 90*a(n-3) for n > 2. (End)
a(n) = 31*a(n-1) - 30*a(n-2) + 3^n for n > 1. - Pierre-Alain Sallard, Dec 15 2019

Extensions

Needs editing. - N. J. A. Sloane, Dec 12 2019

A328351 Let S be any integer in the range 10 <= S <= 30. Sequence has the property that a(n)*S is the sum of all positive integers whose decimal expansion has <= n digits and contains at most four distinct nonzero digits d1, d2, d3 and d4 such that d1+d2+d3+d4=S.

Original entry on oeis.org

0, 1, 45, 1821, 72925, 2917341, 116695005, 4667805661, 186712248285, 7468490018781, 298739601100765, 11949584045428701, 477983361822740445, 19119334472931987421, 764773378917368975325, 30590935156695116926941, 1223637406267806108733405, 48945496250712250075959261
Offset: 0

Views

Author

Pierre-Alain Sallard, Oct 13 2019

Keywords

Comments

This sequence is the building block for the calculation of the sums of positive integers whose decimal notation only uses four distinct, nonzero digits: see the attached pdf document.

Examples

			For n=2, the sum of all positive integers whose decimal notation is only made of the 4,5,6 or 7 digit with at most n=2 such digits, i.e., the sum 4+5+6+7+44+45+46+47+54+55+56+57+64+65+66+67+74+75+76+77, is equal to (4+5+6+7)*a(2)=990.
The formula is valid for any other quadruple, as soon as the four digits are different from each other. Another example: always with n=2 but let's say with the 1,2,3 and 4 digits, the sum 1+2+3+4+11+12+13+14+21+22+23+24+31+32+33+34+41+42+43+44 is equal to a(2)*(1+2+3+4) = 450.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x/(1 - 45 x + 204 x^2 - 160 x^3), {x, 0, 17}], x] (* Michael De Vlieger, Dec 23 2019 *)
  • Python
    [(30*40**n-39*4**n+9)//1053 for n in range(20)]

Formula

a(n) = (30*40^n-39*4^n+9)/1053.
From Stefano Spezia, Oct 15 2019: (Start)
G.f.: x/(1 - 45*x + 204*x^2 - 160*x^3).
E.g.f.: (1/351)*exp(x)*(3 - 13*exp(3*x) + 10*exp(39*x)).
a(n) = 45*a(n-1) - 204*a(n-2) + 160*a(n-3) for n > 2.
(End)
a(n) = 41*a(n-1) - 40*a(n-2) + 4^(n-1) for n > 1. - Pierre-Alain Sallard, Dec 22 2019

A328353 a(n)*S is the sum of all positive integers whose decimal expansion is up to n digits and uses six distinct nonzero digits d1,d2,d3,d4,d5,d6 such that d1+d2+d3+d4+d5+d6=S.

Original entry on oeis.org

0, 1, 67, 4063, 244039, 14643895, 878643031, 52718637847, 3163118606743, 189787118420119, 11387227117300375, 683233627110581911, 40994017627070271127, 2459641057626828406423, 147578463457625377218199, 8854707807457616670088855, 531282468447457564427312791, 31876948106847457250970656407
Offset: 0

Views

Author

Pierre-Alain Sallard, Nov 26 2019

Keywords

Comments

This sequence is the building block for the calculation of the sums of positive integers whose decimal notation only uses six distinct, nonzero digits: see the attached pdf document.

Examples

			For n=2, the sum of all positive integers whose decimal notation is only made of, let's say, the 4,5,6,7,8,9 digits with at most n=2 such digits, i.e. the sum 4+5+6+7+8+9+44+45+46+47+48+49+54+55+56+57+58+59+64+65+66+67+68+69+74+75+76+77+78+79+84+85+86+87+88+89+94+95+96+97+98+99 is equal to a(2)*(4+5+6+7+8+9) = 67*39 = 2613.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{67,-426,360},{0,1,67},20] (* Harvey P. Dale, Feb 11 2022 *)
  • Python
    [(50*60**n-59*6**n+9)//2655 for n in range(20)]

Formula

a(n) = (50*60^n - 59*6^n + 9) / 2655.
a(n) = 61*a(n-1) - 60*a(n-2) + 6^(n-1) for n > 1.
G.f.: x / (1 - 67*x + 426*x^2 -360*x^3).
a(n) = 67*a(n-1) - 426*a(n-2) + 360*a(n-3) for n > 2.

A328354 a(n)*S is the sum of all positive integers whose decimal expansion is up to n digits and uses seven distinct nonzero digits d1,d2,d3,d4,d5,d6,d7 such that d1+d2+d3+d4+d5+d6+d7=S.

Original entry on oeis.org

0, 1, 78, 5517, 386590, 27064101, 1894506678, 132615604717, 9283093290990, 649816537094901, 45487157643722278, 3184101035390113917, 222887072479614855390, 15602095073589188045701, 1092146655151356200377878, 76450265860595725286703117, 5351518610241706308890979790, 374606302716919480394120916501
Offset: 0

Views

Author

Pierre-Alain Sallard, Nov 26 2019

Keywords

Comments

This sequence is the building block for the calculation of the sums of positive integers whose decimal notation uses seven distinct, nonzero digits: see the attached pdf document.

Examples

			For n=2, the sum of all positive integers whose decimal notation is made of, let's say, the 3,4,5,6,7,8 and 9 digits with at most n=2 such digits, i.e., the sum 3+4+5+6+7+8+9+33+34+35+36+37+38+39+43+44+45+46+47+48+49+53+54+55+56+57+58+59+63+64+65+66+67+68+69+73+74+75+76+78+79+83+84+85+86+87+88+89+93+94+95+96+97+98+99, is equal to a(2)*(3+4+5+6+7+8+9) = 78*42 = 3276.
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{78,-567,490},{0,1,78},20] (* Harvey P. Dale, Jan 30 2024 *)
  • PARI
    concat(0, Vec(x / ((1 - x)*(1 - 7*x)*(1 - 70*x)) + O(x^17))) \\ Colin Barker, Dec 06 2019
  • Python
    [(60*70**n-69*7**n+9)//3726 for n in range(20)]
    

Formula

a(n) = (60*70^n-69*7^n+9) / 3726.
a(n) = 71*a(n-1) - 70*a(n-2) + 7^(n-1) for n > 1.
G.f.: x / (1 - 78*x + 567*x^2 - 490*x^3).
a(n) = 78*a(n-1) - 567*a(n-2) + 490*a(n-3) for n > 2.

A328355 Let S be any integer in the range 36 <= S <= 44. Sequence has the property that a(n)*S is the sum of all positive integers whose decimal expansion has <= n digits and uses eight distinct nonzero digits d1,d2,d3,d4,d5,d6,d7,d8 such that d1+d2+d3+d4+d5+d6+d7+d8=S.

Original entry on oeis.org

0, 1, 89, 7193, 576025, 46086681, 3686971929, 294958053913, 23596646709785, 1887731755956761, 151018540629932569, 12081483251621739033, 966518660139556190745, 77321492811243031804441, 6185719424900070836714009, 494857553992010693275990553, 39588604319360895672790202905
Offset: 0

Views

Author

Pierre-Alain Sallard, Dec 10 2019

Keywords

Comments

This sequence is the building block for the calculation of the sums of positive integers whose decimal expansion uses exactly eight distinct, nonzero digits: see the attached pdf documents.

Examples

			For n=2, the sum of all positive integers whose decimal notation is made of any digit different from 0 and, let's say, 9 with at most n=2 such digits, i.e., the sum 1+2+3+4+5+6+7+8+11+12+13+14+15+16+17+18+21+...+28+31+...+38+41+...+48+51+...+58+61+...+68+71+...+78+81+...+88, is equal to a(2)*(1+2+3+4+5+6+7+8) = 89*36 = 3204.
Similarly, and always with n=2, the sum of all positive integers whose decimal notation is made of any digit different from 0 and, let's say, 8, i.e., the sum 1+2+3+4+5+6+7+9+11+..+17+19+21+...+27+29+31+...+37+39+41+...+47+49+51+...+57+59+61+...+67+69+71+...+77+79+91+...+97+99 is equal to a(2)*(1+2+3+4+5+6+7+9) = 89*37 = 3293.
		

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x/(1 - 89 x + 728 x^2 - 640 x^3), {x, 0, 16}], x] (* Michael De Vlieger, Dec 10 2019 *)
  • Python
    [(70*80**n-79*8**n+9)//4977 for n in range(20)]

Formula

a(n) = (70*80^n - 79*8^n + 9) / 4977.
a(n) = 81 a(n-1) - 80 a(n-2) + 8^(n-1) for n > 1.
G.f.: x / (1 - 89*x + 728*x^2 - 640*x^3).
a(n) = 89*a(n-1) - 728*a(n-2) + 640*a(n-3) for n > 2.
E.g.f.: (9*exp(x) - 79*exp(8*x) + 70*exp(80*x))/4977. - Stefano Spezia, Dec 11 2019

A328356 a(n) is the sum of all positive integers whose decimal expansion is up to n digits and does not contain the 0 digit.

Original entry on oeis.org

0, 45, 4500, 409095, 36855450, 3317322645, 298562027400, 26870609370195, 2418355085455350, 217651959870221745, 19588676407933119300, 1762980876890499197295, 158668278921733593899250, 14280145102970321446216845, 1285213059267457612117075200
Offset: 0

Views

Author

Pierre-Alain Sallard, Dec 10 2019

Keywords

Examples

			For n=2, the sum of all integers from 1 to 99 except those containing a zero (i.e., except multiples of 10: 10, 20, ..., 90) is equal to a(2) = 4500.
For n=3, the sum of all integers from 1 to 999 except those containing a zero is equal to a(3) = 409095.
		

Crossrefs

Programs

  • PARI
    concat(0, Vec(45*x / ((1 - x)*(1 - 9*x)*(1 - 90*x)) + O(x^15))) \\ Colin Barker, Dec 10 2019
  • Python
    [(80*90**n-89*9**n+9)*5//712 for n in range(20)]
    

Formula

a(n) = (80*90^n - 89*9^n + 9) * 5 / 712.
a(n) = 91*a(n-1) - 90*a(n-2) + 45*9^(n-1) for n > 1.
G.f.: 45*x / ((1 - x)*(1 - 9*x)*(1 - 90*x)). - Colin Barker, Dec 10 2019
Showing 1-7 of 7 results.