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!)
A078761 Sum of the digits of all n-digit numbers. 0

%I #11 Feb 22 2020 20:35:19

%S 45,855,12600,166500,2070000,24750000,288000000,3285000000,

%T 36900000000,409500000000,4500000000000,49050000000000,

%U 531000000000000,5715000000000000,61200000000000000,652500000000000000,6930000000000000000,73350000000000000000

%N Sum of the digits of all n-digit numbers.

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

%F First differences of A034967: a(n) = 45*n*10^(n-1) - 45*(n-1)10^(n-2) = 45*(9*n+1)*10^(n-2) - _Alexander Adamchuk_, Jan 02 2004

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

%e The sum of the digits of the two-digit numbers 10, 11, 12, ..., 99 is 855. Therefore a(2) = 855.

%t f[n_] := Module[{i, s}, s = 0; For[i = 10^(n - 1), i < 10^n, i++, s = s + Apply[Plus, IntegerDigits[i]]]; s]; t = Table[f[n], {n, 1, 6}]

%t n=Range[15] a=45*(9*n+1)*10^(n-2) (Adamchuk)

%t Rest[CoefficientList[Series[45x (1-x)/(1-10x)^2,{x,0,20}],x]] (* _Harvey P. Dale_, Aug 26 2019 *)

%Y Cf. A034967.

%K base,nonn

%O 1,1

%A _Joseph L. Pe_, Jan 08 2003

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 19 03:30 EDT 2024. Contains 371782 sequences. (Running on oeis4.)