OFFSET
0,3
COMMENTS
A030186 = (1, 2, 7, 22, 71, 228, 733, 2356, 7573, 24342, ...).
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,4,2).
FORMULA
From R. J. Mathar, Feb 10 2009: (Start)
a(n) = 4*a(n-2) + 2*a(n-3).
G.f.: (1+x)/(1-4*x^2-2*x^3). (End)
EXAMPLE
a(3) = 6 = (-1, 3, -3, 1) dot (1, 2, 7, 22) = (-1, 6, -21, 22) = 6.
MAPLE
seq(coeff(series((1+x)/(1-4*x^2-2*x^3), x, n+1), x, n), n = 0..40); # G. C. Greubel, Oct 27 2019
MATHEMATICA
LinearRecurrence[{0, 4, 2}, {1, 1, 4}, 40] (* Harvey P. Dale, Apr 05 2014 *)
PROG
(PARI) my(x='x+O('x^40)); Vec((1+x)/(1-4*x^2-2*x^3)) \\ G. C. Greubel, Oct 27 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1+x)/(1-4*x^2-2*x^3) )); // G. C. Greubel, Oct 27 2019
(Sage)
def A156096_list(prec):
P.<x> = PowerSeriesRing(ZZ, prec)
return P((1+x)/(1-4*x^2-2*x^3)).list()
A156096_list(40) # G. C. Greubel, Oct 27 2019
(GAP) a:=[1, 1, 4];; for n in [4..40] do a[n]:=4*a[n-2]+2*a[n-3]; od; a; # G. C. Greubel, Oct 27 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Gary W. Adamson, Feb 03 2009
EXTENSIONS
More terms from R. J. Mathar, Feb 10 2009
STATUS
approved