A162269 a(n) = ((5+sqrt(2))*(2+sqrt(2))^n + (5-sqrt(2))*(2-sqrt(2))^n)/2.
5, 12, 38, 128, 436, 1488, 5080, 17344, 59216, 202176, 690272, 2356736, 8046400, 27472128, 93795712, 320238592, 1093362944, 3732974592, 12745172480, 43514740736, 148568617984, 507244990464, 1731842725888, 5912880922624
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (4, -2).
Crossrefs
Cf. A162396.
Programs
-
Magma
Z
:=PolynomialRing(Integers()); N :=NumberField(x^2-2); S:=[ ((5+r)*(2+r)^n+(5-r)*(2-r)^n)/2: n in [0..23] ]; [ Integers()!S[j]: j in [1..#S] ]; // Klaus Brockhaus, Jul 02 2009 -
Mathematica
LinearRecurrence[{4,-2},{5,12},30] (* Harvey P. Dale, Jan 03 2016 *)
-
PARI
x='x+O('x^30); Vec((5-8*x)/(1-4*x+2*x^2)) \\ G. C. Greubel, Oct 02 2018
Formula
a(n) = 4*a(n-1) - 2*a(n-2) for n>1; a(0) = 5, a(1) = 12.
G.f.: (5-8*x)/(1-4*x+2*x^2).
From G. C. Greubel, Oct 02 2018: (Start)
a(2*n) = 2^(n-1)*(Q(2*n+1) + 4*Q(2*n)), where Q(m) = Pell-Lucas numbers.
a(2*n+1) = 2^(n+1)*(P(2*n+2) + 4*P(2*n+1)), where P(m) = Pell numbers. (End)
Extensions
Edited and extended beyond a(5) by Klaus Brockhaus, Jul 02 2009
Comments