login
A053541
a(n) = n*10^(n-1).
15
1, 20, 300, 4000, 50000, 600000, 7000000, 80000000, 900000000, 10000000000, 110000000000, 1200000000000, 13000000000000, 140000000000000, 1500000000000000, 16000000000000000, 170000000000000000
OFFSET
1,2
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.
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
MAPLE
seq(n*10^(n-1), n = 1 .. 40); # Bernard Schott, Nov 17 2022
MATHEMATICA
f[n_]:=n*10^(n-1); f[Range[40]] (* Vladimir Joseph Stephan Orlovsky, Feb 09 2011*)
LinearRecurrence[{20, -100}, {1, 20}, 20] (* Harvey P. Dale, Aug 08 2023 *)
PROG
(Magma) [n*10^(n-1): n in [1..30]]; // Vincenzo Librandi, Jun 06 2011
(PARI) a(n)=n*10^(n-1) \\ Charles R Greathouse IV, Dec 05 2011
(Sage) [n*10^(n-1) for n in (1..20)] # G. C. Greubel, May 16 2019
(GAP) List([1..20], n-> n*10^(n-1)) # G. C. Greubel, May 16 2019
KEYWORD
easy,nonn
AUTHOR
Barry E. Williams, Jan 15 2000
EXTENSIONS
Offset changed from 0 to 1 by Vincenzo Librandi, Jun 06 2011
STATUS
approved