OFFSET
0,3
COMMENTS
The polynomial p(n,x) is defined by p(0,x) = 1, p(1,x) = x+1, and p(n,x) = x*p(n-1,x) + 2*(x^2)*p(n-1,x) + 1. See A192872.
A192879 is also generated as the coefficient sequence of x in the reduction x^2->x+1 of the polynomial v(n,x) defined by v(0,x) = 2, v(1,x) = x+1, and v(n,x) = x*v(n-1,x) + 2*(x^2)*v(n-1,x) + 1, for n>0, v(n,x) = F(n)*x^(n-1) + L(n)*x^n, where F(n) = A000045(n) (Fibonacci numbers) and L(n) = A000032(n) (Lucas numbers).
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,2,-1).
FORMULA
a(n) = 2*a(n-1) + 2*a(n-2) - a(n-3), with a(0) = 0, a(1) = 1, a(2) = 4.
G.f.: x * (1+2*x) / ((1+x) * (1-3*x+x^2)). - Colin Barker, Jun 18 2012
a(n) = (2^(-1-n) * ((-1)^n*2^(1+n) + (3+sqrt(5))^n * (-1+3*sqrt(5)) - (3-sqrt(5))^n * (1+3*sqrt(5))))/5. - Colin Barker, Sep 29 2016
a(n) = F(n-1)*F(n) + F(2n), where F(n) is a Fibonacci number. - Rigoberto Florez, Feb 06 2020
E.g.f.: (exp(-x) + exp(3*x/2) * (3*sqrt(5)*sinh(sqrt(5)*x/2) - cosh(sqrt(5)*x/2)))/5. - Stefano Spezia, Feb 06 2020
a(n)*F(n) = the number of ways to tile a 3-arm starfish (with n-1 cells on each arm and one cell in the center) using squares and dominos. - Greg Dresden and Hasita Kanamarlapudi, Oct 02 2023
EXAMPLE
MAPLE
with(combinat); seq( fibonacci(2*n) + fibonacci(n)*fibonacci(n-1), n=0..40); # G. C. Greubel, Feb 13 2020
MATHEMATICA
(See A192878.)
LinearRecurrence[{2, 2, -1}, {0, 1, 4}, 30] (* G. C. Greubel, Jan 07 2019 *)
a[n_] := a[n] = 2*a[n-1]+2*a[n - 2]-a[n-3]; a[0] = 0; a[1]=1; a[2]=4; Table[a[n], {n, 0, 40}] (* Rigoberto Florez, Feb 06 2020 *)
Table[Fibonacci[n]*Fibonacci[n-1]+Fibonacci[2n], {n, 0, 40}] (* Rigoberto Florez, Feb 06 2020 *)
PROG
(PARI) a(n) = round((2^(-1-n)*((-1)^n*2^(1+n)+(3+sqrt(5))^n*(-1+3*sqrt(5))-(3-sqrt(5))^n*(1+3*sqrt(5))))/5) \\ Colin Barker, Sep 29 2016
(PARI) concat(0, Vec(x*(1+2*x)/((1+x)*(1-3*x+x^2)) + O(x^40))) \\ Colin Barker, Sep 29 2016
(Magma) I:=[0, 1, 4]; [n le 3 select I[n] else 2*Self(n-1) +2*Self(n-2) -Self(n-3): n in [1..40]]; // G. C. Greubel, Jan 07 2019
(Sage) (x*(1+2*x)/((1+x)*(1-3*x+x^2))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jan 07 2019
(GAP) a:=[0, 1, 4];; for n in [4..40] do a[n]:=2*a[n-1]+2*a[n-2]-a[n-3]; od; a; # G. C. Greubel, Jan 07 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jul 11 2011
STATUS
approved