OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,2,0,-1).
FORMULA
G.f.: ( 7+4*x+7*x^2 ) / ((1-x)*(1+x))^2. - R. J. Mathar, Jun 21 2011
a(2*n) = A147587(n).
a(2*n+1) = 4*(n+1).
a(n) = (9 + 5*(-1)^n)*(1+n)/2. - Colin Barker, Jun 06 2012
E.g.f.: (1/2)*(5*(1-x)*exp(-x) + 9*(1+x)*exp(x)). - G. C. Greubel, Oct 25 2022
MATHEMATICA
Differences[Sort[Table[9n^2+2n, {n, -30, 30}]]] (* or *) LinearRecurrence[ {0, 2, 0, -1}, {7, 4, 21, 8}, 60] (* Harvey P. Dale, Jun 04 2017 *)
PROG
(Magma) [(9 + 5*(-1)^n)*(1+n)/2: n in [0..60]]; // G. C. Greubel, Oct 25 2022
(SageMath) [(9 + 5*(-1)^n)*(1+n)/2 for n in range(61)] # G. C. Greubel, Oct 25 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Nov 08 2008
STATUS
approved