OFFSET
1,3
LINKS
Vincenzo Librandi and Bruno Berselli, Table of n, a(n) for n = 1..1000 (First 211 terms from Vincenzo Librandi)
Index entries for linear recurrences with constant coefficients, signature (4,-2,-6,4,2,-1).
FORMULA
a(n) = F(n+1)^2 - F(n+2) + (1-(-1)^n)/2.
G.f.: x^2*(1+x-x^2)/((1-x)*(1+x)*(1-x-x^2)*(1-3*x+x^2)). - Bruno Berselli, Jun 20 2012
EXAMPLE
a(4) = F(1)*F(2) + F(1)*F(3) + F(1)*F(4) + F(2)*F(3) + F(2)*F(4) + F(3)*F(4) = 1 + 2 + 3 + 2 + 3 + 6 = 17.
MAPLE
with(combinat): seq(fibonacci(n+1)^2-fibonacci(n+2)+1/2-(1/2)*(-1)^n, n = 1 .. 30);
MATHEMATICA
Table[Fibonacci[n + 1]^2 - Fibonacci[n + 1] + (1 - (-1)^n)/2, {n, 1, 50}] (* G. C. Greubel, Mar 04 2017 *)
PROG
(Magma) [Fibonacci(n+1)^2 - Fibonacci(n+2) + (1-(-1)^n)/2: n in [1..30]]; // Vincenzo Librandi, Jun 05 2011
(PARI) a(n)=fibonacci(n+1)^2-fibonacci(n+2)+n%2 \\ Charles R Greathouse IV, Jun 08 2011
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Emeric Deutsch, May 31 2011
STATUS
approved