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-4 of 4 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)

A033713 Number of zeros in numbers 1 to 999..9 (n digits).

Original entry on oeis.org

0, 9, 189, 2889, 38889, 488889, 5888889, 68888889, 788888889, 8888888889, 98888888889, 1088888888889, 11888888888889, 128888888888889, 1388888888888889, 14888888888888889, 158888888888888889, 1688888888888888889, 17888888888888888889, 188888888888888888889, 1988888888888888888889
Offset: 1

Views

Author

Olivier Gorin (gorin(AT)roazhon.inra.fr)

Keywords

Comments

Also the first n places of 1, ..., n-digit numbers in the almost-natural numbers (A007376). - Erich Friedman.
a(n+1) is also the total number of digits in numbers from 1 through 999..9 (n digits). - Jianing Song, Apr 17 2022

References

  • M. Kraitchik, Mathematical Recreations. Dover, NY, 2nd ed., 1953, p. 49.

Crossrefs

Programs

  • Mathematica
    Table[ Sum[9i*10^(i - 1), {i, 1, n}], {n, 0, 16}]
    LinearRecurrence[{21,-120,100},{0,9,189},30] (* Harvey P. Dale, Jan 24 2012 *)
  • PARI
    a(n)=((n-1)*(10^n)-n*10^(n-1)+1)/9 \\ Charles R Greathouse IV, Feb 19 2017

Formula

From Stephen G Penrice, Oct 01 2000: (Start)
a(n) = (1/9)*((n-1)*(10^n)-n*10^(n-1)+1).
G.f.: (9*x^2)/((1-x)(1-10x)^2). (End)
a(n) = Sum_{i=1..n} 9*i*10^(i-1).
a(1)=0, a(2)=9, a(3)=189, a(n)=21*a(n-1)-120*a(n-2)+100*a(n-3). - Harvey P. Dale, Jan 24 2012
a(n+1) = A058183(10^n-1) for n >= 1. - Jianing Song, Apr 17 2022
E.g.f.: exp(x)*(1 + exp(9*x)*(9*x - 1))/9. - Stefano Spezia, Sep 13 2023

Extensions

More terms from Erich Friedman.
a(18)-a(21) from Stefano Spezia, Sep 13 2023

A268839 a(n) = Sum_{j=1..10^n-1} 2^f(j) where f(j) is the number of zero digits in the decimal representation of j.

Original entry on oeis.org

9, 108, 1197, 13176, 144945, 1594404, 17538453, 192922992, 2122152921, 23343682140, 256780503549, 2824585539048, 31070440929537, 341774850224916, 3759523352474085, 41354756877214944, 454902325649364393, 5003925582143008332, 55043181403573091661
Offset: 1

Views

Author

Michel Lagneau, Feb 14 2016

Keywords

Comments

We calculate the number of integers between 1 and 10^n - 1 having k zeros in their decimal representation. To form a such number consisting of m digits (k < m), place k zeros in m-1 possible positions, then we must choose m-k digits different from zero. Thus, the number of integers between 1 and 10^n - 1 having k zeros in their decimal representation is: Sum_{m=k+1..n} binomial(m-1, k)*9^(m-k).
Hence the sum: Sum_{m=1..n} Sum_{k=0..m-1} binomial(m-1,k)*9^(m-k)*2^k = Sum_{m=1..n} 9^m*(11/9)*(m-1) = (9/10)*(11^n - 1).

Examples

			a(1) = 9 because 2^f(1) + 2^f(2) + ... + 2^f(9) = 2^0 + 2^0 + ... + 2^0 = 9;
a(2) = 108 because 2^f(1) + 2^f(2) + ... + 2^f(99) = 9*10 + 2*9 = 108, where f(10) = f(20) = ... = f(90) = 1 and f(i) = 0 otherwise.
		

Crossrefs

Programs

  • Magma
    [(9/10)*(11^n-1): n in [1..20]]; // Vincenzo Librandi, Feb 15 2016
    
  • Maple
    for n from 1 to 100 do: x:=(9/10)*(11^n-1):printf(‘%d, ‘,x):od:
  • Mathematica
    Table[Table[(9/10) (11^n - 1), {n, 1, 20}]] (* Bruno Berselli, Feb 15 2016 *)
    CoefficientList[Series[9/((1 - 11 x) (1 - x)), {x, 0, 33}], x] (* Vincenzo Librandi, Feb 15 2016 *)
  • PARI
    Vec(9*x/((1-11*x)*(1-x)) + O(x^30)) \\ Colin Barker, Feb 22 2016

Formula

a(n) = (9/10)*(11^n-1) = 9*A016123(n-1).
From Vincenzo Librandi, Feb 15 2016: (Start)
G.f.: (9*x)/((1-11*x)*(1-x)).
a(n) = 11*a(n-1) + 9. (End)
E.g.f.: 9*exp(x)*(exp(10*x) - 1)/10. - Stefano Spezia, Sep 13 2023

Extensions

Name edited by Jon E. Schoenfield, Sep 13 2017
Showing 1-4 of 4 results.