OFFSET
0,2
COMMENTS
Half the number of n X 3 binary arrays with a path of adjacent 1's and a path of adjacent 0's from top row to bottom row.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
J. Hietarinta and C.-M. Viallet, Singularity confinement and chaos in discrete systems, Physical Review Letters 81 (1998), pp. 326-328.
Index entries for linear recurrences with constant coefficients, signature (4,-4,1).
FORMULA
a(0) = 1, a(1) = 3, a(2) = 9, a(3) = 25; a(n) = 3*a(n-1) - 3*a(n-3) + a(n-4).
a(n) = 3*a(n-1) - a(n-2) + 1 for n>1, a(1) = 3, a(0) = 0. - Reinhard Zumkeller, May 02 2006
From R. J. Mathar, Feb 23 2009: (Start)
a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3).
G.f.: (1-x+x^2)/((1-x)*(1-3*x+x^2)). (End)
a(n) = 1 + 2*Sum_{k=0..n} Fibonacci(2*k) = 1+2*A027941(n). - Gary Detlefs, Dec 07 2010
a(n) = (2^(-n)*(-5*2^n -(3-sqrt(5))^n*(-5+sqrt(5)) +(3+sqrt(5))^n*(5+sqrt(5))))/5. - Colin Barker, Nov 02 2016
MATHEMATICA
a[n_]:= a[n] = 3a[n-1] - 3a[n-3] + a[n-4]; a[0] = 1; a[1] = 3; a[2] = 9; a[3] = 25; Table[ a[n], {n, 0, 30}]
Table[2*Fibonacci[2*n+1]-1, {n, 0, 30}] (* G. C. Greubel, Apr 22 2018 *)
LinearRecurrence[{4, -4, 1}, {1, 3, 9}, 30] (* Harvey P. Dale, Sep 22 2020 *)
PROG
(Magma) [2*Fibonacci(2*n+1)-1: n in [0..30]]; // Vincenzo Librandi, Apr 18 2011
(PARI) a(n) = 2*fibonacci(2*n+1)-1 \\ Charles R Greathouse IV, Jun 11 2015
(PARI) Vec((1-x+x^2)/((1-x)*(1-3*x+x^2)) + O(x^30)) \\ Colin Barker, Nov 02 2016
(Sage) [2*fibonacci(2*n+1)-1 for n in (0..30)] # G. C. Greubel, Jul 11 2019
(GAP) List([0..30], n-> 2*Fibonacci(2*n+1)-1); # G. C. Greubel, Jul 11 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
R. H. Hardin, Mar 22 2002
EXTENSIONS
Simpler definition from Vladeta Jovovic, Mar 19 2003
STATUS
approved