login
A122109
a(n) = 9*a(n-2) - 4*a(n-3) for n > 2 with a(0)=1, a(1)=2.
1
1, 2, 6, 14, 46, 102, 358, 734, 2814, 5174, 22390, 35310, 180814, 228230, 1486086, 1330814, 12461854, 6032982, 106833430, 4449422, 937368942, -387288922, 8418522790, -7235076066, 77315860798, -98789775754, 724783051446, -1198371424978, 6918206566030, -13684475030586
OFFSET
0,2
FORMULA
G.f.: (1 + 2*x - 3*x^2)/(1 - 9*x^2 + 4*x^3).
MAPLE
seq(coeff(series((1+2*x-3*x^2)/(1-9*x^2+4*x^3), x, n+1), x, n), n = 0..30); # G. C. Greubel, Oct 02 2019
MATHEMATICA
LinearRecurrence[{0, 9, -4}, {1, 2, 6}, 30] (* G. C. Greubel, Oct 02 2019 *)
PROG
(PARI) my(x='x+O('x^30)); Vec((1+2*x-3*x^2)/(1-9*x^2+4*x^3)) \\ G. C. Greubel, Oct 02 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 30); Coefficients(R!( (1+2*x-3*x^2)/(1-9*x^2+4*x^3) )); // G. C. Greubel, Oct 02 2019
(Sage)
def A122109_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1+2*x-3*x^2)/(1-9*x^2+4*x^3)).list()
A122109_list(30) # G. C. Greubel, Oct 02 2019
(GAP) a:=[1, 2, 6];; for n in [4..30] do a[n]:=9*a[n-2]-4*a[n-3]; od; a; # G. C. Greubel, Oct 02 2019
CROSSREFS
Sequence in context: A299042 A152806 A366223 * A133155 A297708 A284701
KEYWORD
sign
AUTHOR
Philippe Deléham, Oct 18 2006
EXTENSIONS
Terms a(26) onward added by G. C. Greubel, Oct 02 2019
STATUS
approved