login
A237416
Smallest multiple of 5 beginning with n.
1
10, 20, 30, 40, 5, 60, 70, 80, 90, 10, 110, 120, 130, 140, 15, 160, 170, 180, 190, 20, 210, 220, 230, 240, 25, 260, 270, 280, 290, 30, 310, 320, 330, 340, 35, 360, 370, 380, 390, 40, 410, 420, 430, 440, 45, 460, 470, 480, 490, 50, 510, 520, 530, 540, 55, 560
OFFSET
1,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