login
A034967
Sum of digits of numbers between 0 and (10^n)-1.
13
0, 45, 900, 13500, 180000, 2250000, 27000000, 315000000, 3600000000, 40500000000, 450000000000, 4950000000000, 54000000000000, 585000000000000, 6300000000000000, 67500000000000000, 720000000000000000, 7650000000000000000, 81000000000000000000, 855000000000000000000
OFFSET
0,2
REFERENCES
Edward J. Barbeau, Murray S. Klamkin, and William O. J. Moser, Five Hundred Mathematical Challenges, Problem 284 at pp. 142-143 (1995).
FORMULA
a(n) = 45*n*10^(n-1).
From Harvey P. Dale, Oct 09 2011: (Start)
a(n) = 20*a(n-1) - 100*a(n-2), a(0)=0, a(1)=45.
G.f.: 45*x/(10*x-1)^2. (End)
a(n) = (9*n*10^n)/2. - Harvey P. Dale, Apr 23 2018
From Elmo R. Oliveira, Nov 20 2025: (Start)
E.g.f.: 45*x*exp(10*x).
a(n) = 45*A053541(n). (End)
MAPLE
seq(45*n*10^(n-1), n=0..30); # Robert Israel, Jun 29 2018
MATHEMATICA
Table[45n 10^(n-1), {n, 0, 20}] (* or *) LinearRecurrence[{20, -100}, {0, 45}, 21] (* Harvey P. Dale, Oct 09 2011 *)
PROG
(PARI) a(n)=45*n*10^(n-1) \\ Charles R Greathouse IV, Oct 07 2015
(Magma) [45*n*10^(n-1): n in [0..30]]; // Vincenzo Librandi, Jun 30 2018
CROSSREFS
Sequence in context: A359933 A341573 A078761 * A199352 A195466 A010961
KEYWORD
nonn,easy,base
AUTHOR
EXTENSIONS
More terms from James Sellers, Jan 19 2000
STATUS
approved