OFFSET
0,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,3).
FORMULA
From R. J. Mathar, Apr 04 2008: (Start)
O.g.f.: (1 -5*x^2)/(1 -3*x +3*x^2 -3*x^3).
MAPLE
m:=40; S:=series( (1-5*x^2)/(1-3*x+3*x^2-3*x^3), x, m+1): seq(coeff(S, x, j), j=0..m); # G. C. Greubel, Apr 12 2021
MATHEMATICA
LinearRecurrence[{3, -3, 3}, {1, 3, 1}, 40] (* Harvey P. Dale, Jun 22 2013 *)
PROG
(Magma) I:=[1, 3, 1]; [n le 3 select I[n] else 3*(Self(n-1) -Self(n-2) +Self(n-3)): n in [1..41]]; // G. C. Greubel, Apr 12 2021
(Sage)
def A136297_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-5*x^2)/(1-3*x+3*x^2-3*x^3) ).list()
A136297_list(40) # G. C. Greubel, Apr 12 2021
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Mar 21 2008
EXTENSIONS
More terms from R. J. Mathar, Apr 04 2008
STATUS
approved