OFFSET
1,2
COMMENTS
Form the matrix A=[1,1,1;2,1,0;1,0,0]. a(n) is the sum of the second row elements of A^n. - Paul Barry, Sep 22 2004
REFERENCES
J. H. Conway, The Sensual (Quadratic) Form, MAA.
LINKS
Colin Barker, Table of n, a(n) for n = 1..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) for n > 3, with a(1)=1, a(2)=3, a(3)=9.
a(n) = Fibonacci(n)^2 + Fibonacci(n-1)^2 + 2*Fibonacci(n)*Fibonacci(n+1) + 3*Fibonacci(n-1)*Fibonacci(n), with offset 0. - Paul Barry, Sep 22 2004
a(n) = Fibonacci(n+1)^2 - Fibonacci(n-2)^2 - (-1)^n. - Thomas Baruchel, Jul 29 2005
From J. M. Bergot, Aug 26 2013: (Start)
a(n) = F(n-2)*F(n-1) + F(n-1)*F(n) + F(n)*F(n+1), where F=A000045.
a(n) = (L(2*n+1) + L(2*n-1) + L(2*n-3) - (-1)^n)/5, where L=A000032. [Corrected by Ehren Metcalfe, Mar 26 2016]
Starting at n=2 create Pythagorean triangles by using side x = b^2 - a^2, side y = 2*a*b, and side y = a^2 + b^2. For three successive triangles, let a=F(n) and b=F(n+1), a=F(n+1) and b=F(n+2), and a=F(n+2) and b=F(n+3); then a(n+3)=one-half the sum of the three perimeters.
(End)
G.f.: x*(1+x+x^2) / ( (1+x)*(x^2-3*x+1) ). - R. J. Mathar, Aug 28 2013
a(n) = 4*Fibonacci(n-1)*Fibonacci(n) - (-1)^n. - Bruno Berselli, Oct 30 2015
a(n) = Lucas(2*n-1) - Fibonacci(n-1)*Fibonacci(n). See similar identity for A264080. - Bruno Berselli, Nov 04 2015
a(n) = (1/5)*(4*Lucas(2*n-1) - (-1)^n). - Ehren Metcalfe, Mar 26 2016
a(n) = 2^(-n)*(-(-2)^n - 2*(3-sqrt(5))^n*(1+sqrt(5)) + 2*(-1+sqrt(5))*(3+sqrt(5))^n)/5. - Colin Barker, Sep 30 2016
a(n) = (-1)^(n-1) + 3*a(n-1) - a(n-2) with a(1) = 1 and a(2) = 3. - Peter Bala, Nov 12 2017
EXAMPLE
a(7) = 417 since a(7) = 2*a(6) + 2*a(5) - a(4) = 2*159 + 2*6 - 23.
MATHEMATICA
LinearRecurrence[{2, 2, -1}, {1, 3, 9}, 40] (* Harvey P. Dale, May 31 2015 *)
PROG
(PARI) x='x+O('x^99); Vec(x*(1+x+x^2)/((1+x)*(x^2-3*x+1))) \\ Altug Alkan, Mar 26 2016
(PARI) a(n) = round(2^(-n)*(-(-2)^n-2*(3-sqrt(5))^n*(1+sqrt(5))+2*(-1+sqrt(5))*(3+sqrt(5))^n)/5) \\ Colin Barker, Sep 30 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Darrin Frey (freyd(AT)cedarville.edu), Jun 14 2001
STATUS
approved