login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Sum of all digits of all integers less than or equal to 555...55 (with n 5's) in base 10.
7

%I #17 Mar 26 2024 14:46:17

%S 0,15,370,6150,86430,1114210,13641990,161419770,1864197550,

%T 21141975330,236419753110,2614197530890,28641975308670,

%U 311419753086450,3364197530864230,36141975308642010,386419753086419790

%N Sum of all digits of all integers less than or equal to 555...55 (with n 5's) in base 10.

%C From a suggestion of _Yalcin Aktar_

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

%F a(n) = 20/9*n-110/81*10^n+110/81+5/2*n*10^n (formula from B. Greco).

%F G.f.: 5*x*(25*x^2+8*x+3) / ((x-1)^2*(10*x-1)^2). - _Colin Barker_, Jun 14 2013

%e a(1)=15 since numbers less than or equal to 5 are 1,2,3,4,5 and the sum of digits is 1+2+3+4+5=15.

%t LinearRecurrence[{22,-141,220,-100},{0,15,370,6150},20] (* _Harvey P. Dale_, Aug 01 2016 *)

%K base,nonn,easy

%O 0,2

%A _Benoit Cloitre_, Oct 20 2003