OFFSET
0,2
COMMENTS
a(n) (n=1..) is half the number of nX2 binary arrays with no element equal to a strict majority of its diagonal and antidiagonal neighbors. - R. H. Hardin, Dec 02 2010
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..200
Index entries for linear recurrences with constant coefficients, signature (2,2,-1).
FORMULA
a(n) = 2*A007598(n).
G.f.: 2*x*(1-x)/(1+x)/(1-3*x+x^2). - Colin Barker, Feb 23 2012
a(n) = F(n-1)*F(n+1) + F(n-2)*F(n+2), where F = A000045, -F(-2) = F(-1) = 1. - Bruno Berselli, Nov 03 2015
a(n) = 2*(-2*(-1)^n+(1/2*(3-sqrt(5)))^n+(1/2*(3+sqrt(5)))^n)/5. - Colin Barker, Sep 28 2016
For n>1 a(n) is the denominator of the continued fraction [1, 1, ... 1, 2, 1, 1, ... 1, 2] with n-2 1's before each 2. See A236428 for the numerator. - Greg Dresden and Kevin Zhanming Zheng, Aug 16 2020
MATHEMATICA
Table[2 Fibonacci[n]^2, {n, 0, 40}] (* Bruno Berselli, Nov 03 2015 *)
LinearRecurrence[{2, 2, -1}, {0, 2, 2}, 50] (* Harvey P. Dale, May 24 2023 *)
PROG
(Magma) [2*Fibonacci(n)^2: n in [0..50]]; // Vincenzo Librandi, Apr 24 2011
(PARI) a(n) = round(2*(-2*(-1)^n+(1/2*(3-sqrt(5)))^n+(1/2*(3+sqrt(5)))^n)/5) \\ Colin Barker, Sep 28 2016
(PARI) Vec(2*x*(1-x)/(1+x)/(1-3*x+x^2) + O(x^30)) \\ Colin Barker, Sep 28 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Dec 03 2010
STATUS
approved