A114696 Expansion of (1+4*x+x^2)/((1-x^2)*(1-2*x-x^2)); a Pellian-related sequence.
1, 6, 15, 40, 97, 238, 575, 1392, 3361, 8118, 19599, 47320, 114241, 275806, 665855, 1607520, 3880897, 9369318, 22619535, 54608392, 131836321, 318281038, 768398399, 1855077840, 4478554081, 10812186006, 26102926095, 63018038200, 152139002497, 367296043198
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,2,-2,-1).
Crossrefs
Programs
-
Maple
Q:= proc(n) option remember; # Q=A002203 if n<2 then 2 else 2*Q(n-1) + Q(n-2) fi; end: seq((Q(n+2) -3 -(-1)^n)/2, n=0..40); # G. C. Greubel, May 24 2021
-
Mathematica
CoefficientList[Series[(1+4*x+x^2)/((1-x^2)*(1-2*x-x^2)), {x,0,30}], x] (* or *) LinearRecurrence[{2,2,-2,-1}, {1,6,15,40}, 30] (* Harvey P. Dale, Jan 23 2014 *)
-
PARI
Vec((1+4*x+x^2)/((1-x^2)*(1-2*x-x^2)) + O(x^30)) \\ Colin Barker, May 26 2016
-
Sage
[(lucas_number2(n+2,2,-1) -3 -(-1)^n)/2 for n in (0..30)] # G. C. Greubel, May 24 2021
Formula
G.f.: (1 +4*x +x^2)/((1-x)*(1+x)*(1-2*x-x^2)).
a(0)=1, a(1)=6, a(2)=15, a(3)=40, a(n) = 2*a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4). - Harvey P. Dale, Jan 23 2014
a(n) = (-3 - (-1)^n + (3-2*sqrt(2))*(1-sqrt(2))^n + (1+sqrt(2))^n*(3+2*sqrt(2)))/2. - Colin Barker, May 26 2016
From G. C. Greubel, May 24 2021: (Start)
a(n) = (1/2)*(A002203(n+2) - 3 - (-1)^n). (End)
Comments