OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Index entries for linear recurrences with constant coefficients, signature (0,0,0,0,2,0,0,0,0,-1).
FORMULA
G.f.: 5*x*(2 +4*x +6*x^2 +8*x^3 +x^4 +8*x^5 +6*x^6 +4*x^7 +2*x^8)/(1 -x^5)^2.
a(n) = 2*a(n-5) - a(n-10).
MATHEMATICA
Table[If[Mod[n, 5]==0, n, If[Mod[10 n, 5]==0, 10 n, 10 n + 5 - Mod[10 n, 5]]], {n, 60}] (* or *) CoefficientList[Series[5 (2 + 4 x + 6 x^2 + 8 x^3 + x^4 + 8 x^5 + 6 x^6 + 4 x^7 + 2 x^8)/(1 - x^5)^2, {x, 0, 40}], x]
PROG
I:=[10, 20, 30, 40, 5, 60, 70, 80, 90, 10]; [n le 10 select I[n] else 2*Self(n-5)-Self(n-10): n in [1..60]];
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vincenzo Librandi, Feb 10 2014
STATUS
approved