OFFSET
0,1
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,4).
FORMULA
a(n) = 2*a(n-1) + 4*a(n-2) for n > 1; a(0) = 3, a(1) = 8.
G.f.: (3+2*x)/(1-2*x-4*x^2).
a(n) = 2^n * A000032(n+2). - Diego Rattaggi, Jun 17 2020
MATHEMATICA
CoefficientList[Series[(3+2*x)/(1-2*x-4*x^2), {x, 0, 50}], x] (* or *) LinearRecurrence[{2, 4}, {3, 8}, 30] (* G. C. Greubel, Dec 22 2017 *)
PROG
(Magma) Z<x>:=PolynomialRing(Integers()); N<r>:=NumberField(x^2-5); S:=[ ((3+r)*(1+r)^n+(3-r)*(1-r)^n)/2: n in [0..23] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 21 2009
(Magma) I:=[3, 8]; [n le 2 select I[n] else 2*Self(n-1) + 4*Self(n-2): n in [1..30]]; // G. C. Greubel, Dec 22 2017
(PARI) x='x+O('x^30); Vec((3+2*x)/(1-2*x-4*x^2)) \\ G. C. Greubel, Dec 22 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Al Hakanson (hawkuu(AT)gmail.com), Jul 20 2009
EXTENSIONS
Edited and extended beyond a(5) by Klaus Brockhaus, Jul 21 2009
STATUS
approved