OFFSET
0,2
LINKS
Colin Barker, Table of n, a(n) for n = 0..996
Index entries for linear recurrences with constant coefficients, signature (22,-141,220,-100).
FORMULA
From Colin Barker, Sep 02 2015: (Start)
a(n) = (9*(9*10^n+28)*n-64*(10^n-1))/81.
a(n) = 22*a(n-1)-141*a(n-2)+220*a(n-3)-100*a(n-4) for n>3.
G.f.: 2*x*(125*x^2-2*x+3) / ((x-1)^2*(10*x-1)^2).
(End)
EXAMPLE
a(2) = 0+2+4+6+8+1+0+1+2+1+4+..+4+4 = 128.
MATHEMATICA
Table[Sum[Total@ IntegerDigits@ k, {k, 0, FromDigits@ Table[4, {n}], 2}], {n, 0, 8}] (* Michael De Vlieger, Sep 02 2015 *)
LinearRecurrence[{22, -141, 220, -100}, {0, 6, 128, 2220}, 20] (* Harvey P. Dale, Sep 03 2018 *)
PROG
(PARI) concat(0, Vec(2*x*(125*x^2-2*x+3)/((x-1)^2*(10*x-1)^2) + O(x^30))) \\ Colin Barker, Sep 02 2015
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Yalcin Aktar, Dec 25 2003
EXTENSIONS
More terms from David Wasserman, Sep 09 2005
STATUS
approved