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.

A053541 a(n) = n*10^(n-1).

Original entry on oeis.org

1, 20, 300, 4000, 50000, 600000, 7000000, 80000000, 900000000, 10000000000, 110000000000, 1200000000000, 13000000000000, 140000000000000, 1500000000000000, 16000000000000000, 170000000000000000
Offset: 1

Views

Author

Barry E. Williams, Jan 15 2000

Keywords

Comments

This sequence gives the number of 1's (or any other nonzero digit) required to write all integers from 0 up to 10^n-1. - Jason D. W. Taff (jtaff(AT)jburroughs.org), Dec 05 2004 (improved by Bernard Schott, Nov 17 2022)
The corresponding number of 0's required to write all these integers from 0 up to 10^n-1 is A033714(n). - Bernard Schott, Nov 17 2022

References

  • Albert H. Beiler, Recreations in the Theory of Numbers, Dover, N.Y., 1964, pp. 194-196.

Crossrefs

Programs

Formula

a(n) = 20*a(n-1) - 100*a(n-2), with a(0)=0, a(1)=1, a(2)=20.
From Jason D. W. Taff (jtaff(AT)jburroughs.org), Dec 05 2004: (Start)
a(n) = 10*a(n-1) + 10*(n-1).
a(n) = Sum_{k=1..n} k*binomial(n,k)*9^(n-k).
a(n) = A094798(10^n - 1). (End)
From G. C. Greubel, May 16 2019: (Start)
G.f.: x/(1-10*x)^2.
E.g.f.: x*exp(10*x). (End)
From Amiram Eldar, Oct 28 2020: (Start)
Sum_{n>=1} 1/a(n) = 10*log(10/9).
Sum_{n>=1} (-1)^(n+1)/a(n) = 10*log(11/10). (End)
a(n) = Sum_{k=1..n} A081045(k-1). - Bernard Schott, Nov 17 2022

Extensions

Offset changed from 0 to 1 by Vincenzo Librandi, Jun 06 2011

A212704 a(n) = 9*n*10^(n-1).

Original entry on oeis.org

9, 180, 2700, 36000, 450000, 5400000, 63000000, 720000000, 8100000000, 90000000000, 990000000000, 10800000000000, 117000000000000, 1260000000000000, 13500000000000000, 144000000000000000, 1530000000000000000, 16200000000000000000, 171000000000000000000, 1800000000000000000000
Offset: 1

Views

Author

Stanislav Sykora, May 25 2012

Keywords

Comments

Main transitions in systems of n particles with spin 9/2.
Please, refer to the general explanation in A212697.
This particular sequence is obtained for base b=10, corresponding to spin S = (b-1)/2 = 9/2.
Number of 0 needed to write all numbers of n+1 digits. - Bruno Berselli, Jun 30 2014
Essentially the same as A113119. - Bernard Schott, Nov 15 2022
From Bernard Schott, Nov 22 2022: (Start)
Number of nonzero digits needed to write all integers from 1 up to 10^n - 1.
a(n) is a square iff n in { A016754 union A033583\{0} } (see formulas). (End)

Crossrefs

Programs

  • Mathematica
    Rest@ CoefficientList[Series[9 x/(10 x - 1)^2, {x, 0, 18}], x] (* or *)
    Array[9 # 10^(# - 1) &, 18] (* Michael De Vlieger, Nov 18 2019 *)
  • PARI
    mtrans(n, b) = n*(b-1)*b^(n-1);
    a(n) = mtrans(n, 10);
    
  • Python
    def a(n): return 9*n*10**(n-1)
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Nov 14 2022

Formula

a(n) = n*(b-1)*b^(n-1) with b=10.
From R. J. Mathar, Oct 15 2013: (Start)
G.f.: 9*x/(10*x-1)^2.
a(n) = 9*A053541(n). (End)
From Bernard Schott, Nov 14 2022: (Start)
a(n+1) - a(n) = 9*A081045(n).
a(n) = A113119(n) for n > 1.
a(n) = A033713(n+1) - A033713(n) = A033714(n+1) - A033714(n).
a(A016754(n)) = (3 * (2n+1) * 10^(2*n*(n+1)))^2.
a(A033583(n)) = (3 * n * 10^(5*n^2))^2. (End)
From Elmo R. Oliveira, May 13 2025: (Start)
E.g.f.: 9*x*exp(10*x).
a(n) = A008591(n)*A011557(n-1).
a(n) = 20*a(n-1) - 100*a(n-2) for n > 2. (End)

A113119 Total number of digits in all n-digit nonnegative integers.

Original entry on oeis.org

10, 180, 2700, 36000, 450000, 5400000, 63000000, 720000000, 8100000000, 90000000000, 990000000000, 10800000000000, 117000000000000, 1260000000000000, 13500000000000000, 144000000000000000, 1530000000000000000, 16200000000000000000, 171000000000000000000
Offset: 1

Views

Author

Alexandre Wajnberg, Jan 03 2006

Keywords

Examples

			a(1)=10 because there are ten one-digit numbers (including the 0).
a(2)=180 because there are 100-10=90 two-digit numbers, for a total of 90*2=180 digits.
		

Crossrefs

Essentially the same as A212704.

Programs

  • Mathematica
    LinearRecurrence[{20,-100},{10,180,2700},20] (* Harvey P. Dale, Dec 09 2021 *)
  • PARI
    Vec(10*x*(1-2*x+10*x^2)/(1-10*x)^2 + O(x^20)) \\ Colin Barker, Aug 05 2016
    
  • Python
    def a(n): return 10 if n == 1 else 9*n*10**(n-1)
    print([a(n) for n in range(1, 21)]) # Michael S. Branicky, Nov 14 2022

Formula

For n > 1, a(n) = 9*n*10^(n-1).
From Colin Barker, Aug 05 2016: (Start)
a(n) = 20*a(n-1) - 100*a(n-2) for n > 3.
G.f.: 10*x*(1 - 2*x + 10*x^2) / (1-10*x)^2.
(End)
From Bernard Schott, Nov 14 2022: (Start)
a(n) = A212704(n) for n > 1.
a(n) = 9 * A053541(n) for n > 1.
a(n) = 9 * A081045(n-1) + A212704(n-1), for n > 1 (means a(n) = number of nonzero digits + number of zero digits). (End)
E.g.f.: x*(1 + 9*exp(10*x)). - Stefano Spezia, Dec 24 2022

Extensions

More terms from Joshua Zucker, May 08 2006
a(17) corrected by Colin Barker, Aug 05 2016

A081044 9th binomial transform of (1,8,0,0,0,0,0,0,.....).

Original entry on oeis.org

1, 17, 225, 2673, 29889, 321489, 3365793, 34543665, 349156737, 3486784401, 34480423521, 338218086897, 3295011258945, 31914537622353, 307565765227809, 2951106226689969, 28207085096966913, 268687927383516945
Offset: 0

Views

Author

Paul Barry, Mar 04 2003

Keywords

Comments

Also number of (n+1)-digit numbers with exactly one '9' in their decimal expansion. Nine can be replaced by any nonzero digit 1..9. - Zak Seidov, Jul 11 2016

Crossrefs

Programs

  • Mathematica
    Table[(8n+9)9^(n-1),{n,0,30}] (*or*) LinearRecurrence[{18, -81}, {1, 17}, 40] (* Vincenzo Librandi, Feb 23 2012 *)
  • PARI
    a(n) = (8*n+9)*9^(n-1); \\ Altug Alkan, Jul 18 2016

Formula

a(n) = 18*a(n-1)-81*a(n-2), a(0)=0, a(1)=17.
a(n) = (8n+9)*9^(n-1).
a(n) = Sum_{k=0..n} (k+1)*8^k*binomial(n, k).
G.f.: (1-x)/(1-9x)^2.
E.g.f.: (1 + 8*x)*exp(9*x). - Ilya Gutkovskiy, Jul 18 2016

A358439 Number of even digits necessary to write all positive n-digit integers.

Original entry on oeis.org

4, 85, 1300, 17500, 220000, 2650000, 31000000, 355000000, 4000000000, 44500000000, 490000000000, 5350000000000, 58000000000000, 625000000000000, 6700000000000000, 71500000000000000, 760000000000000000, 8050000000000000000, 85000000000000000000, 895000000000000000000
Offset: 1

Views

Author

Bernard Schott, Nov 16 2022

Keywords

Comments

If nonnegative n-digit integers were considered, then a(1) would be 5.
Also, a(n) is the total number of holes in all positive n-digit integers, assuming 4 has no hole. Digits 0, 6 and 9 have 1 hole, digit 8 has 2 holes, and other digits have no holes or (circular) loops (as in A064532).
Proof of the first formula: For n>=2, to write all positive n-digit integers, digits 6, 8, 9 occur A081045(n-1) = (9n+1)*10^(n-2) times each, and digit 0 occurs A212704(n-1) = 9*(n-1)*10^(n-2) times; so a(n) = 4*A081045(n-1) + A212704(n-1).
For a(1), if 0 were included then there would be 5 holes in the 1-digit numbers 0..9.

Examples

			To write the integers from 10 up to 99, each of the digits 2, 4, 6 and 8 must be used 19 times, and digit 0 must be used 9 times hence a(2) = 4*19 + 9 = 85.
		

Crossrefs

Programs

  • Maple
    seq((5*(9*n-1))*10^(n-2), n = 1 .. 30);
  • Mathematica
    a[n_] := 5*(9*n - 1)*10^(n - 2); Array[a, 22] (* Amiram Eldar, Nov 16 2022 *)

Formula

a(n) = 5*(9n-1)*10^(n-2).
Formulas coming from the name with even digits:
a(n) = A358854(10^n-1) - A358854(10^(n-1)-1).
a(n) = A113119(n) - A359271(n) for n >= 2.
Formula coming from the comment with holes:
a(n) = Sum_{k=10^(n-1)..10^n-1} A064532(k).

A358620 Number of nonzero digits needed to write all nonnegative n-digit integers.

Original entry on oeis.org

9, 171, 2520, 33300, 414000, 4950000, 57600000, 657000000, 7380000000, 81900000000, 900000000000, 9810000000000, 106200000000000, 1143000000000000, 12240000000000000, 130500000000000000, 1386000000000000000, 14670000000000000000, 154800000000000000000
Offset: 1

Views

Author

Bernard Schott, Nov 23 2022

Keywords

Examples

			a(1) = 9 because there are 9 one-digit numbers that are > 0.
a(2) = 171 because there are 90 two-digit numbers, so 90*2 = 180 digits are needed to write these integers, nine of these integers end with 0, and 180-9 = 171.
		

Crossrefs

Programs

  • Maple
    seq((9*(9*n+1))*10^(n-2), n = 1 .. 20);
  • Mathematica
    a[n_] := 9*(9*n + 1)*10^(n - 2); Array[a, 20] (* Amiram Eldar, Nov 23 2022 *)
  • PARI
    a(n)=(81*n+9)*10^(n-2) \\ Charles R Greathouse IV, Nov 29 2022
    
  • Python
    def A358620(n): return 9 if n == 1 else 9*(9*n+1)*10**(n-2) # Chai Wah Wu, Nov 29 2022

Formula

a(n) = 9 * (9*n+1) * 10^(n-2).
a(n) = 20*a(n-1) - 100*a(n-2); a(1)=9, a(2)=171.
a(n) = 9 * A081045(n-1).
a(n) = A113119(n) - A212704(n-1), for n >= 2.

A380747 Array read by ascending antidiagonals: A(n,k) = [x^n] (1 - x)/(1 - k*x)^2.

Original entry on oeis.org

1, -1, 1, 0, 1, 1, 0, 1, 3, 1, 0, 1, 8, 5, 1, 0, 1, 20, 21, 7, 1, 0, 1, 48, 81, 40, 9, 1, 0, 1, 112, 297, 208, 65, 11, 1, 0, 1, 256, 1053, 1024, 425, 96, 13, 1, 0, 1, 576, 3645, 4864, 2625, 756, 133, 15, 1, 0, 1, 1280, 12393, 22528, 15625, 5616, 1225, 176, 17, 1
Offset: 0

Views

Author

Stefano Spezia, Jan 31 2025

Keywords

Examples

			The array begins as:
   1, 1,   1,    1,     1,     1, ...
  -1, 1,   3,    5,     7,     9, ...
   0, 1,   8,   21,    40,    65, ...
   0, 1,  20,   81,   208,   425, ...
   0, 1,  48,  297,  1024,  2625, ...
   0, 1, 112, 1053,  4864, 15625, ...
   0, 1, 256, 3645, 22528, 90625, ...
   ...
		

Crossrefs

Cf. A000012 (k=1 or n=0), A000567 (n=2), A001792 (k=2), A007778, A060747 (n=1), A081038 (k=3), A081039 (k=4), A081040 (k=5), A081041 (k=6), A081042 (k=7), A081043 (k=8), A081044 (k=9), A081045 (k=10), A103532, A154955, A380748 (antidiagonal sums).

Programs

  • Mathematica
    A[0,0]:=1; A[1,0]:=-1; A[n_,k_]:=((k-1)*n+k)k^(n-1); Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten (* or *)
    A[n_,k_]:=SeriesCoefficient[(1-x)/(1-k*x)^2,{x,0,n}]; Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten (* or *)
    A[n_,k_]:=n!SeriesCoefficient[Exp[k*x](1+(k-1)*x),{x,0,n}]; Table[A[n-k,k],{n,0,10},{k,0,n}]//Flatten

Formula

A(n,k) = ((k - 1)*n + k)*k^(n-1) with A(0,0) = 1.
A(n,k) = n! * [x^n] exp(k*x)*(1 + (k - 1)*x).
A(n,0) = A154955(n+1).
A(3,n) = A103532(n-1) for n > 0.
A(n,n) = A007778(n) for n > 0.
Showing 1-7 of 7 results.