OFFSET
0,3
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..950
Index entries for linear recurrences with constant coefficients, signature (14,-28,8).
FORMULA
From R. J. Mathar, Sep 24 2008: (Start)
G.f.: x*(1+2*x)/((1-2*x)*(1-12*x+4*x^2)).
a(n) = 14*a(n-1) - 28*a(n-2) + 8*a(n-3) for n > 2; a(0) = 0, a(1) = 1; a(2) = 16. - Klaus Brockhaus, Jul 15 2009
a(n) = A007070(n)^2 = (((sqrt(2)+1)^n - (sqrt(2)-1)^n)) / 2) ^ 2. - Franklin T. Adams-Watters, Aug 06 2009
a(n) = 2^(n-3)*(Q(2*n) - 2), where Q(m) are the Pell-Lucas numbers (A002203). - G. C. Greubel, Sep 27 2018
MATHEMATICA
Table[ Simplify[ ((2 + Sqrt@2)^n - (2 - Sqrt@2)^n)^2/8], {n, 0, 19}] (* Robert G. Wilson v, Sep 24 2008 *)
CoefficientList[Series[x (1 + 2 x) / ((1 - 2 x) (1 - 12 x + 4 x^2)), {x, 0, 33}], x] (* Vincenzo Librandi, Feb 06 2018 *)
LinearRecurrence[{14, -28, 8}, {0, 1, 16}, 20] (* Harvey P. Dale, Apr 12 2020 *)
PROG
(Magma) Z<x>:=PolynomialRing(Integers()); N<r2>:=NumberField(x^2-2); [ Integers()!a: a in [ ((2+r2)^n-(2-r2)^n)^2/8: n in [0..19] ] ]; // Klaus Brockhaus, Oct 20 2008
(Magma) I:=[0, 1, 16]; [n le 3 select I[n] else 14*Self(n-1)-28*Self(n-2)+8*Self(n-3): n in [1..20]]; // Vincenzo Librandi, Feb 05 2018
(PARI) x='x+O('x^30); concat([0], Vec(x*(1+2*x)/((1-2*x)*(1-12*x+4*x^2)) )) \\ G. C. Greubel, Sep 27 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Al Hakanson (hawkuu(AT)gmail.com), Sep 22 2008
STATUS
approved