OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,0,-4).
FORMULA
From R. J. Mathar, Apr 04 2008: (Start)
O.g.f.: (1 -x -2*x^2 -x^3)/((1+x)*(1-2*x)^2).
a(n) = (11*2^n + (-1)^n)/9 - A001787(n+1)/12 if n>0. (End)
From G. C. Greubel, Apr 12 2021: (Start)
a(n) = (2^(n-2)*(41-3*n) + (-1)^n)/9 - (1/4)*[n=0].
E.g.f.: (-9 + 4*exp(-x) + (41 - 6*x)*exp(2*x))/36. (End)
MATHEMATICA
LinearRecurrence[{3, 0, -4}, {1, 2, 4, 7}, 41] (* G. C. Greubel, Apr 12 2021 *)
PROG
(Magma) [1] cat [(2^(n-2)*(41-3*n) + (-1)^n)/9: n in [1..40]]; // G. C. Greubel, Apr 12 2021
(Sage) [1]+[(2^(n-2)*(41-3*n) + (-1)^n)/9 for n in (1..40)] # G. C. Greubel, Apr 12 2021
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Mar 22 2008
STATUS
approved