OFFSET
1,1
LINKS
Index entries for linear recurrences with constant coefficients, signature (20,-100).
FORMULA
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
G.f.: 45*x*(1 - x)/(1 - 10*x)^2. - Arkadiusz Wesolowski, Jul 12 2012
EXAMPLE
The sum of the digits of the two-digit numbers 10, 11, 12, ..., 99 is 855. Therefore a(2) = 855.
MATHEMATICA
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}]
n=Range[15] a=45*(9*n+1)*10^(n-2) (Adamchuk)
Rest[CoefficientList[Series[45x (1-x)/(1-10x)^2, {x, 0, 20}], x]] (* Harvey P. Dale, Aug 26 2019 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Joseph L. Pe, Jan 08 2003
STATUS
approved