OFFSET
1,1
COMMENTS
LINKS
Jeremy Gardiner, Table of n, a(n) for n = 1..4000
Index entries for linear recurrences with constant coefficients, signature (1,0,0,1,-1).
FORMULA
a(n) = 2*A047201(n).
G.f.: 2*x*(1+x+x^2+x^3+x^4) / ( (1+x)*(1+x^2)*(x-1)^2 ). - R. J. Mathar, Oct 06 2012
a(n) = 2*(n+floor((n-1)/4)). - Aaron J Grech, Sep 28 2024
E.g.f.: (4 - cos(x) + (5*x - 3)*cosh(x) + sin(x) + (5*x - 2)*sinh(x))/2. - Stefano Spezia, Sep 28 2024
MATHEMATICA
CoefficientList[Series[2*(1 + x + x^2 + x^3 + x^4)/((1 + x)*(1 + x^2)*(x - 1)^2), {x, 0, 100}], x] (* Vincenzo Librandi, Dec 28 2012 *)
PROG
(BASIC)
for n=1 to 199
if n mod 5 <> 0 and n mod 2 <> 1 then print str$(n)+", ";
next n
print
(PARI) A217562(n)=(n-1)*5\2+2 \\ - M. F. Hasler, Oct 07 2012
(Magma) I:=[2, 4, 6, 8, 12]; [n le 5 select I[n] else Self(n-1) + Self(n-4) - Self(n-5): n in [1..60]]; // Vincenzo Librandi, Dec 28 2012
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jeremy Gardiner, Oct 06 2012
STATUS
approved