login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101291 Sum of all numbers with n digits. 7

%I #43 Jun 29 2023 18:53:46

%S 45,4905,494550,49495500,4949955000,494999550000,49499995500000,

%T 4949999955000000,494999999550000000,49499999995500000000,

%U 4949999999955000000000,494999999999550000000000,49499999999995500000000000,4949999999999955000000000000

%N Sum of all numbers with n digits.

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

%C All terms have digital root 9. - _Halfdan Skjerning_, Jun 18 2019

%D 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]

%H Vincenzo Librandi, <a href="/A101291/b101291.txt">Table of n, a(n) for n = 1..100</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (110, -1000).

%F 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

%F 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

%F G.f.: 45*x*(1 - x)/(1 - 110*x + 1000*x^2). - _Arkadiusz Wesolowski_, Jul 12 2012

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

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

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

%p 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);

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

%o (PARI) A101291(n)=(n=10^(n-1))*(11*n-1)\2*9 \\ _M. F. Hasler_, Nov 26 2008

%o (Magma) [9*(11*10^(2*n-2) -10^(n-1))/2: n in [1..15]]; // _G. C. Greubel_, Jul 07 2019

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

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

%Y First differences of A037182.

%K nonn,base,easy

%O 1,1

%A _Jorge Coveiro_, Dec 21 2004

%E More terms from _Robert G. Wilson v_, Dec 24 2004

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 15:52 EDT 2024. Contains 371961 sequences. (Running on oeis4.)