login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101291 Sum of all numbers with n digits. 7
45, 4905, 494550, 49495500, 4949955000, 494999550000, 49499995500000, 4949999955000000, 494999999550000000, 49499999995500000000, 4949999999955000000000, 494999999999550000000000, 49499999999995500000000000, 4949999999999955000000000000 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

All terms are multiples of 45: A101291 = 45*(1, 109, 10990, 1099900, 109999000, ...), cf. formula. - M. F. Hasler, Nov 26 2008

All terms have digital root 9. - Halfdan Skjerning, Jun 18 2019

REFERENCES

Edward J. Barbeau, Murray S. Klamkin, William O. J. Moser, Five Hundred Mathematical Challenges, Problem 34 page 60, MAA Washington DC 1995. [Lekraj Beedassy, Mar 02 2017]

LINKS

Vincenzo Librandi, Table of n, a(n) for n = 1..100

FORMULA

a(n) = 99*100^n/200 - 9*10^n/20 = (99*100^n - 90*10^n)/200 = 9*(11*10^(n-1) - 1)*10^(n-1)/2 = 45*(11*10^(2n-3) - 10^(n-2)). - M. F. Hasler, Nov 26 2008

Expanding and rearranging, we have a(n) = (494+1)*10^(2n-3) - (100-55)*10^(n-2) = 494*10^(2n-3) + (10^(n-3) - 1)*10^n + 55*10^(n-2) = 494*10^(2n-3) + 99...9 (n-3 times)*10^n + 55*10^(n-2). Thus, for n>2, a(n) = 494, followed by (n-3) times digit 9, followed by 55, followed by (n-2) times digit 0, i.e., 494 99...9(n-3) times 55 00...0(n-2) times. - Lekraj Beedassy, Mar 02 2017

G.f.: 45*x*(1 - x)/(1 - 110*x + 1000*x^2). - Arkadiusz Wesolowski, Jul 12 2012

EXAMPLE

a(1) = 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 = 45;

a(2) = 10 + 11 + 12 + 13 + 14 + ... + 97 + 98 + 99 = 4905;

a(3) = 100 + 101 + 102 + 103 + ... + 997 + 998 + 999 = 494550.

MAPLE

sum(x, x=1..9), sum(x, x=10..99), sum(x, x=100..999), sum(x, x=1000..9999), sum(x, x=10000..99999), sum(x, x=100000..999999), sum(x, x=1000000..9999999), sum(x, x=10000000..99999999);

MATHEMATICA

f[n_] := 10^n(10^n - 1)/2; Table[f[n] - f[n - 1], {n, 15}] (* Robert G. Wilson v Dec 24 2004 *)

PROG

(PARI) A101291(n)=(n=10^(n-1))*(11*n-1)\2*9 \\ M. F. Hasler, Nov 26 2008

(MAGMA) [9*(11*10^(2*n-2) -10^(n-1))/2: n in [1..15]]; // G. C. Greubel, Jul 07 2019

(Sage) [9*(11*10^(2*n-2) -10^(n-1))/2 for n in (1..15)] # G. C. Greubel, Jul 07 2019

(GAP) List([1..15], n-> 9*(11*10^(2*n-2) -10^(n-1))/2 ) # G. C. Greubel, Jul 07 2019

CROSSREFS

First differences of A037182.

Sequence in context: A274603 A036521 A093533 * A061542 A037182 A178632

Adjacent sequences:  A101288 A101289 A101290 * A101292 A101293 A101294

KEYWORD

nonn,base,easy

AUTHOR

Jorge Coveiro, Dec 21 2004

EXTENSIONS

More terms from Robert G. Wilson v, Dec 24 2004

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 22:26 EDT 2019. Contains 326109 sequences. (Running on oeis4.)