OFFSET
0,1
LINKS
FORMULA
a(n) = 2*a(n-1) + 2*a(n-2) for n > 1; a(0) = 4, a(1) = 7.
G.f.: (4-x)/(1-2*x-2*x^2).
MAPLE
seq((1/2)*simplify((4+sqrt(3))*(1+sqrt(3))^n+(4-sqrt(3))*(1-sqrt(3))^n), n = 0 .. 27); # Emeric Deutsch, Jul 16 2009
MATHEMATICA
LinearRecurrence[{2, 2}, {4, 7}, 30] (* Harvey P. Dale, Sep 21 2018 *)
PROG
(Magma) Z<x>:=PolynomialRing(Integers()); N<r>:=NumberField(x^2-3); S:=[ ((4+r)*(1+r)^n+(4-r)*(1-r)^n)/2: n in [0..25] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 13 2009
CROSSREFS
KEYWORD
nonn
AUTHOR
Al Hakanson (hawkuu(AT)gmail.com), Jul 06 2009
EXTENSIONS
Edited by Klaus Brockhaus, Paolo P. Lava and Emeric Deutsch, Jul 13 2009
Two different extensions were received. This version was rechecked by N. J. A. Sloane, Jul 19 2009
STATUS
approved