|
|
A136297
|
|
a(n) = 3*a(n-1) - 3*a(n-2) + 3*a(n-3), with a(0)=1, a(1)=3, a(2)=1.
|
|
2
|
|
|
1, 3, 1, -3, -3, 3, 9, 9, 9, 27, 81, 189, 405, 891, 2025, 4617, 10449, 23571, 53217, 120285, 271917, 614547, 1388745, 3138345, 7092441, 16028523, 36223281, 81861597, 185000517, 418086603, 944843049, 2135270889, 4825543329, 10905346467, 24645222081, 55696256829, 125869143645
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
LINKS
|
|
|
FORMULA
|
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)
P.<x> = PowerSeriesRing(ZZ, prec)
return P( (1-5*x^2)/(1-3*x+3*x^2-3*x^3) ).list()
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|