%I #18 Sep 08 2022 08:45:12
%S 0,20,360,5520,75080,950640,11506200,135061760,1550617320,17506172880,
%T 195061728440,2150617284000,23506172839560,255061728395120,
%U 2750617283950680,29506172839506240,315061728395061800,3350617283950617360,35506172839506172920
%N Sum of all digits in all even numbers from 0 to 8(10^(k+1)-1)/9 (with (k+1) 8's).
%H Colin Barker, <a href="/A089350/b089350.txt">Table of n, a(n) for n = 0..996</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (22,-141,220,-100).
%F a(k+1) = 4((10^k)(110*4+405k-135)-4(18k+29)+162k+216)/81.
%F From _Colin Barker_, Sep 02 2015: (Start)
%F a(n) = (2*(-20*(-1+10^n)+9*(20+9*10^n)*n))/81.
%F a(n) = 22*a(n-1)-141*a(n-2)+220*a(n-3)-100*a(n-4) for n>3.
%F G.f.: 20*x*(21*x^2-4*x+1) / ((x-1)^2*(10*x-1)^2).
%F (End)
%e a(2) = 0+2+4+6+8+1+0+1+2+1+4+..+8+8 = 360.
%t Table[Sum[Total@ IntegerDigits@ k, {k, 0, FromDigits@ Table[8, {n}], 2}], {n, 0, 8}] (* or *)
%t Table[(2 (-20 (-1 + 10^n) + 9 (20 + 9*10^n) n))/81, {n, 0, 18}] (* _Michael De Vlieger_, Sep 02 2015 *)
%t LinearRecurrence[{22, -141, 220, -100}, {0, 20, 360, 5520}, 20] (* _Vincenzo Librandi_, Sep 03 2015 *)
%o (PARI) concat(0, Vec(20*x*(21*x^2-4*x+1) / ((x-1)^2*(10*x-1)^2) + O(x^30))) \\ _Colin Barker_, Sep 02 2015
%o (Magma) [(2*(-20*(-1+10^n)+9*(20+9*10^n)*n))/81: n in [0..20]]; // _Vincenzo Librandi_, Sep 03 2015
%K nonn,base,easy
%O 0,2
%A _Yalcin Aktar_, Dec 26 2003
%E More terms from _Colin Barker_, Sep 03 2015