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

A089903 Sum of digits of numbers between 0 and (1/9)*(10^n-1).

Original entry on oeis.org

0, 1, 48, 960, 14572, 195684, 2456796, 29567908, 345679020, 3956790132, 44567901244, 495679012356, 5456790123468, 59567901234580, 645679012345692, 6956790123456804, 74567901234567916, 795679012345679028
Offset: 0

Views

Author

Benoit Cloitre, Nov 14 2003

Keywords

Comments

From a suggestion of Yalcin Aktar

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{22,-141,220,-100},{0,1,48,960},20] (* Harvey P. Dale, May 12 2023 *)

Formula

a(n) = s(1, n-1) where s(a, k)=a*(k+1)+a^2*sum(i=0, k, i*10^(k-i))+sum(i=0, k, 5*a*(9*(k-i)+a- 1)*10^(k-i-1)).
a(n) = (-88*(-1+10^n)+9*(16+9*10^n)*n)/162. G.f.: x*(45*x^2+26*x+1) / ((x-1)^2*(10*x-1)^2). - Colin Barker, Jun 14 2013

A089904 Sum of digits of numbers between 0 and (2/9)*(10^n-1).

Original entry on oeis.org

0, 3, 109, 2055, 30501, 404947, 5049393, 60493839, 704938285, 8049382731, 90493827177, 1004938271623, 11049382716069, 120493827160515, 1304938271604961, 14049382716049407, 150493827160493853
Offset: 0

Views

Author

Benoit Cloitre, Nov 14 2003

Keywords

Comments

From a suggestion of Yalcin Aktar

Crossrefs

Formula

a(n) = s(2, n-1) where s(a, k)=a*(k+1)+a^2*sum(i=0, k, i*10^(k-i))+sum(i=0, k, 5*a*(9*(k-i)+a- 1)*10^(k-i-1)).
a(n) = (-77*(-1+10^n)+9*(14+9*10^n)*n)/81. G.f.: x*(80*x^2+43*x+3) / ((x-1)^2*(10*x-1)^2). - Colin Barker, Jun 14 2013

A089905 Sum of digits of numbers between 0 and (3/9)*(10^n-1).

Original entry on oeis.org

0, 6, 183, 3285, 47787, 627789, 7777791, 92777793, 1077777795, 12277777797, 137777777799, 1527777777801, 16777777777803, 182777777777805, 1977777777777807, 21277777777777809, 227777777777777811
Offset: 0

Views

Author

Benoit Cloitre, Nov 14 2003

Keywords

Comments

From a suggestion of Yalcin Aktar

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{22,-141,220,-100},{0,6,183,3285},20] (* Harvey P. Dale, Apr 19 2013 *)

Formula

a(n) = s(3, n-1) where s(a, k)=a*(k+1)+a^2*sum(i=0, k, i*10^(k-i))+sum(i=0, k, 5*a*(9*(k-i)+a- 1)*10^(k-i-1))
a(n) = 22*a(n-1)-141*a(n-2)+220*a(n-3)-100*a(n-4). - T. D. Noe, Nov 08 2006
a(n) = (-11/9*(-1+10^n)+1/2*(4+3*10^n)*n). G.f.: 3*x*(5*x+1)*(7*x+2) / ((x-1)^2*(10*x-1)^2). - Colin Barker, Jun 14 2013

Extensions

Corrected by T. D. Noe, Nov 08 2006

A089906 Sum of digits of numbers between 0 and (4/9)*(10^n-1).

Original entry on oeis.org

0, 10, 270, 4650, 66430, 864210, 10641990, 126419770, 1464197550, 16641975330, 186419753110, 2064197530890, 22641975308670, 246419753086450, 2664197530864230, 28641975308642010, 306419753086419790
Offset: 0

Views

Author

Benoit Cloitre, Nov 14 2003

Keywords

Comments

From a suggestion of Yalcin Aktar

Crossrefs

Formula

a(n) = s(4, n-1) where s(a, k)=a*(k+1)+a^2*sum(i=0, k, i*10^(k-i))+sum(i=0, k, 5*a*(9*(k-i)+a- 1)*10^(k-i-1)).
a(n) = (2*(-55*(-1+10^n)+9*(10+9*10^n)*n))/81. G.f.: 10*x*(12*x^2+5*x+1) / ((x-1)^2*(10*x-1)^2). - Colin Barker, Jun 14 2013

A089907 Sum of digits of numbers between 0 and (6/9)*(10^n-1).

Original entry on oeis.org

0, 21, 483, 7785, 107787, 1377789, 16777791, 197777793, 2277777795, 25777777797, 287777777799, 3177777777801, 34777777777803, 377777777777805, 4077777777777807, 43777777777777809, 467777777777777811
Offset: 0

Views

Author

Benoit Cloitre, Nov 14 2003

Keywords

Comments

From a suggestion of Yalcin Aktar

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{22,-141,220,-100},{0,21,483,7785},20] (* Harvey P. Dale, Aug 22 2022 *)

Formula

a(n) = s(6, n-1) where s(a, k)=a*(k+1)+a^2*sum(i=0, k, i*10^(k-i))+sum(i=0, k, 5*a*(9*(k-i)+a- 1)*10^(k-i-1)).
a(n) = (-11/9*(-1+10^n)+(2+3*10^n)*n). G.f.: 3*x*(40*x^2+7*x+7) / ((x-1)^2*(10*x-1)^2). - Colin Barker, Jun 14 2013

A089908 Sum of digits of numbers between 0 and (7/9)*(10^n-1).

Original entry on oeis.org

0, 28, 609, 9555, 130501, 1654947, 20049393, 235493839, 2704938285, 30549382731, 340493827177, 3754938271623, 41049382716069, 445493827160515, 4804938271604961, 51549382716049407, 550493827160493853
Offset: 0

Views

Author

Benoit Cloitre, Nov 14 2003

Keywords

Comments

From a suggestion of Yalcin Aktar

Crossrefs

Formula

a(n) = s(7, n-1) where s(a, k)=a*(k+1)+a^2*sum(i=0, k, i*10^(k-i))+sum(i=0, k, 5*a*(9*(k-i)+a- 1)*10^(k-i-1)).
a(n) = (7*(-22*(-1+10^n)+9*(4+9*10^n)*n))/162. G.f.: 7*x*(15*x^2-x+4) / ((x-1)^2*(10*x-1)^2). - Colin Barker, Jun 14 2013

A089909 Sum of digits of numbers between 0 and (8/9)*(10^n-1).

Original entry on oeis.org

0, 36, 748, 11460, 154572, 1945684, 23456796, 274567908, 3145679020, 35456790132, 394567901244, 4345679012356, 47456790123468, 514567901234580, 5545679012345692, 59456790123456804, 634567901234567916
Offset: 0

Views

Author

Benoit Cloitre, Nov 14 2003

Keywords

Comments

From a suggestion of Yalcin Aktar

Crossrefs

Formula

a(n) = s(8, n-1) where s(a, k)=a*(k+1)+a^2*sum(i=0, k, i*10^(k-i))+sum(i=0, k, 5*a*(9*(k-i)+a- 1)*10^(k-i-1)).
a(n) = (4*(-11*(-1+10^n)+9*(2+9*10^n)*n))/81. G.f.: 4*x*(20*x^2-11*x+9) / ((x-1)^2*(10*x-1)^2). - Colin Barker, Jun 14 2013

A178756 Rectangular array T(n,k) = binomial(n,2)*k*n^(k-1) read by antidiagonals.

Original entry on oeis.org

1, 4, 3, 12, 18, 6, 32, 81, 48, 10, 80, 324, 288, 100, 15, 192, 1215, 1536, 750, 180, 21, 448, 4374, 7680, 5000, 1620, 294, 28, 1024, 15309, 36864, 31250, 12960, 3087, 448, 36, 2304, 52488, 172032, 187500, 97200, 28812, 5376, 648, 45
Offset: 2

Views

Author

Geoffrey Critzer, Dec 26 2010

Keywords

Comments

T(n,k) is the sum of the digits in all n-ary words of length k. That is, sequences of k digits taken on an alphabet of {0,1,2,...,n-1}.
Note the rectangle is indexed begining from n = 2 (binary sequences) which is A001787.

Examples

			1,4,12,32,80,192,448,1024
3,18,81,324,1215,4374,15309,52488
6,48,288,1536,7680,36864,172032,786432
10,100,750,5000,31250,187500,1093750,6250000
15,180,1620,12960,97200,699840,4898880,33592320
		

Crossrefs

Cf. A036290 (ternary sequences), A034967 (decimal digits).

Programs

  • GAP
    T:=Flat(List([3..10], n-> List([2..n-1], k-> Binomial(k,2)*(n-k)* k^(n-k-1) ))); # G. C. Greubel, Jan 24 2019
  • Magma
    [[Binomial(k,2)*(n-k)*k^(n-k-1): k in [2..n-1]]: n in [3..10]]; // G. C. Greubel, Jan 24 2019
    
  • Maple
    T:= (n, k)-> binomial(n, 2)*k*n^(k-1):
    seq(seq(T(n, 1+d-n), n=2..d), d=2..14); # Alois P. Heinz, Jan 17 2013
  • Mathematica
    Table[Range[8]! Rest[CoefficientList[Series[Binomial[n,2]x Exp[n x],{x,0,8}],x]],{n,2,10}]//Grid
    T[n_, k_]:= Binomial[n, 2]*k*n^(k-1); Table[T[k,n-k], {n,2,10}, {k, 2, n-1}]//Flatten (* G. C. Greubel, Jan 24 2019 *)
  • PARI
    {T(n,k) = binomial(n,2)*k*n^(k-1)};
    for(n=2,10, for(k=2,n-1, print1(T(k,n-k), ", "))) \\ G. C. Greubel, Jan 24 2019
    
  • Sage
    [[binomial(k,2)*(n-k)*k^(n-k-1) for k in (2..n-1)] for n in (3..10)] # G. C. Greubel, Jan 24 2019
    

Formula

E.g.f. for row n: binomial(n,2)*x*exp(n*x).

A078761 Sum of the digits of all n-digit numbers.

Original entry on oeis.org

45, 855, 12600, 166500, 2070000, 24750000, 288000000, 3285000000, 36900000000, 409500000000, 4500000000000, 49050000000000, 531000000000000, 5715000000000000, 61200000000000000, 652500000000000000, 6930000000000000000, 73350000000000000000
Offset: 1

Views

Author

Joseph L. Pe, Jan 08 2003

Keywords

Examples

			The sum of the digits of the two-digit numbers 10, 11, 12, ..., 99 is 855. Therefore a(2) = 855.
		

Crossrefs

Cf. A034967.

Programs

  • Mathematica
    f[n_] := Module[{i, s}, s = 0; For[i = 10^(n - 1), i < 10^n, i++, s = s + Apply[Plus, IntegerDigits[i]]]; s]; t = Table[f[n], {n, 1, 6}]
    n=Range[15] a=45*(9*n+1)*10^(n-2) (Adamchuk)
    Rest[CoefficientList[Series[45x (1-x)/(1-10x)^2,{x,0,20}],x]] (* Harvey P. Dale, Aug 26 2019 *)

Formula

First differences of A034967: a(n) = 45*n*10^(n-1) - 45*(n-1)10^(n-2) = 45*(9*n+1)*10^(n-2) - Alexander Adamchuk, Jan 02 2004
G.f.: 45*x*(1 - x)/(1 - 10*x)^2. - Arkadiusz Wesolowski, Jul 12 2012

A316492 Numbers k such that the average digit in the concatenation of the numbers from 1 through k is an integer.

Original entry on oeis.org

1, 3, 5, 7, 9, 122, 576, 1422, 1876, 4122, 4576
Offset: 1

Views

Author

Jon E. Schoenfield, Aug 11 2018

Keywords

Comments

Equivalently, numbers k such that A058183(k) divides A037123(k).
4576 is the final term; 4 < A037123(k)/A058183(k) < 5 for all k > 4576.

Examples

			9 is a term because the average digit in 123456789 is (1+2+3+4+5+6+7+8+9)/9 = 45/9 = 5 (an integer).
122 is a term because 12345789101112..119120121122 has digit sum 1032 and digit count 258, and 1032/258 = 4 (an integer).
		

Crossrefs

Programs

  • Mathematica
    Flatten@ Position[ Divide @@@ Transpose[ Accumulate /@ {Total /@ #, Length /@ #} &@ IntegerDigits@ Range@ 5000], Integer] (* _Giovanni Resta, Aug 12 2018 *)
Showing 1-10 of 11 results. Next