OFFSET
0,2
COMMENTS
From a suggestion of Yalcin Aktar
LINKS
Index entries for linear recurrences with constant coefficients, signature (22,-141,220,-100).
FORMULA
a(n) = 20/9*n-110/81*10^n+110/81+5/2*n*10^n (formula from B. Greco).
G.f.: 5*x*(25*x^2+8*x+3) / ((x-1)^2*(10*x-1)^2). - Colin Barker, Jun 14 2013
EXAMPLE
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.
MATHEMATICA
LinearRecurrence[{22, -141, 220, -100}, {0, 15, 370, 6150}, 20] (* Harvey P. Dale, Aug 01 2016 *)
CROSSREFS
KEYWORD
base,nonn,easy
AUTHOR
Benoit Cloitre, Oct 20 2003
STATUS
approved