OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,0,-3,1).
FORMULA
G.f.: (1 - 3*x^2 + x^3)/(1 - 3*x + 3*x^3 - x^4).
a(n) = F(n+1)*F(n+2) + (1 - (-1)^n)/2, where F = A000045.
a(n) = (F(n+2)*(1 + (-1)^n)/2 + F(n)*(1 - (-1)^n)/2)*(F(n+3)*(1 - (-1)^n)/2 + F(n+1)*(1 + (-1)^n)/2).
a(n)*a(n+2) - a(n+1)^2 = (-1)^n*(F(2*n+4) - 1).
a(n) = 3*a(n-1) - 3*a(n-3) + a(n-4). - G. C. Greubel, May 16 2016
a(n) = Sum_{i=0..n+1} F(i+1)*F(i-1), where F(-1) = 1. - Bruno Berselli, Feb 16 2017
MATHEMATICA
LinearRecurrence[{3, 0, -3, 1}, {1, 3, 6, 16}, 30] (* G. C. Greubel, May 16 2016 *)
PROG
(Magma) /* From the sixth formula: */ F:=Fibonacci; [&+[F(i+1)*F(i-1): i in [0..n+1]]: n in [0..30]]; // Bruno Berselli, Feb 15 2017
(PARI) my(x='x+O('x^30)); Vec((1-3*x^2+x^3)/(1-3*x+3*x^3-x^4)) \\ G. C. Greubel, Jan 09 2019
(Sage) ((1-3*x^2+x^3)/(1-3*x+3*x^3-x^4)).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 09 2019
(GAP) a:=[1, 3, 6, 16];; for n in [5..30] do a[n]:=3*a[n-1]-3*a[n-3]+a[n-4]; od; a; # G. C. Greubel, Jan 09 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Barry, Oct 16 2009
STATUS
approved