login
A089304
Sum of all digits in all even numbers from 0 to 222...2 (with n 2's).
2
0, 2, 51, 975, 14699, 196923, 2469147, 29691371, 346913595, 3969135819, 44691358043, 496913580267, 5469135802491, 59691358024715, 646913580246939, 6969135802469163, 74691358024691387, 796913580246913611, 8469135802469135835, 89691358024691358059
OFFSET
0,2
FORMULA
From Harvey P. Dale, Jan 16 2015: (Start)
G.f.: (135*x^3+7*x^2+2*x)/(10*x^2-11*x+1)^2.
a(n) = (2880*n+10^n (81*n-167)-2020)/1620.
a(n) = 22*a(n-1)-141*a(n-2)+220*a(n-2)-100*a(n-4).
(End)
EXAMPLE
a(2) = 0+2+4+6+8+(1+0)+(1+2)+(1+4)+(1+6)+(1+8)+(2+0)+(2+2) = 51.
MATHEMATICA
LinearRecurrence[{22, -141, 220, -100}, {0, 2, 51, 975}, 30] (* Harvey P. Dale, Jan 16 2015 *)
PROG
(PARI) concat(0, Vec((135*x^3+7*x^2+2*x)/(10*x^2-11*x+1)^2 + O(x^30))) \\ Colin Barker, Sep 02 2015
CROSSREFS
Sequence in context: A037058 A106042 A222850 * A210907 A099368 A132492
KEYWORD
nonn,base,easy
AUTHOR
Yalcin Aktar, Dec 25 2003
EXTENSIONS
More terms from David Wasserman, Sep 08 2005
STATUS
approved