OFFSET
0,2
COMMENTS
LINKS
FORMULA
a(n) = 8*a(n-1) - 11*a(n-2) for n > 1; a(0) = 1, a(1) = 9.
G.f.: (1+x)/(1-8*x+11*x^2).
MATHEMATICA
f[n_] := Block[{s = Sqrt@ 5}, Simplify[((1 + s)(4 + s)^n + (1 - s)(4 - s)^n)/2]]; Array[f, 21, 0] (* Or *)
a[n_] := 8 a[n - 1] - 11 a[n - 2]; a[0] = 1; a[1] = 9; Array[a, 22, 0] (* Or *)
CoefficientList[Series[(1 + x)/(1 - 8 x + 11 x^2), {x, 0, 21}], x] (* Robert G. Wilson v *)
PROG
(Magma) Z<x>:=PolynomialRing(Integers()); N<r>:=NumberField(x^2-5); S:=[ ((1+r)*(4+r)^n+(1-r)*(4-r)^n)/2: n in [0..19] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 19 2009
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Al Hakanson (hawkuu(AT)gmail.com), Jul 13 2009
EXTENSIONS
Edited and extended beyond a(5) by Klaus Brockhaus, Jul 19 2009
STATUS
approved