OFFSET
0,4
COMMENTS
For n > 0, a(n) is the number of ways to tile a strip of length n with squares, dominoes, and two colors of trominoes, with the restriction that the first tile cannot be a square. - Greg Dresden and Bora Bursalı, Aug 31 2023
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,2).
FORMULA
a(0)=1, a(1)=0, a(2)=1, a(n) = a(n-1) + a(n-2) + 2*a(n-3) for n > 2. - Philippe Deléham, Sep 19 2006
a(n) + a(n+1) = A122552(n+1). - Philippe Deléham, Sep 25 2006
If p[1]=0, p[2]=1, p[i]=3, (i>2), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n >= 1, a(n)=det A. - Milan Janjic, May 02 2010
For n > 3, a(n) = A077947(n-2) + 2*A077947(n-3), with A077947 beginning (1, 2, 5, 9, 18, 37, ...); "1" has offset 1. - Gary W. Adamson, May 13 2013
a(n) = 2^(n-1) - 3*floor((2^(n-1))/7) - 1, for n >= 1. - Ridouane Oudra, Dec 02 2019
G.f.: (1 - x) / ((1 - 2*x) * (1 + x + x^2)). - Michael Somos, Nov 18 2020
EXAMPLE
G.f. = 1 + x^2 + 3*x^3 + 4*x^4 + 9*x^5 + 19*x^6 + 36*x^7 + 73*x^8 + ... - Michael Somos, Nov 18 2020
MATHEMATICA
CoefficientList[Series[(1-x)/(1-x-x^2-2*x^3), {x, 0, 50}], x] (* Harvey P. Dale, Mar 17 2011 *)
LinearRecurrence[{1, 1, 2}, {1, 0, 1}, 50] (* Vladimir Joseph Stephan Orlovsky, Feb 24 2012 *)
PROG
(PARI) Vec((1-x)/(1-x-x^2-2*x^3)+O(x^50)) \\ Charles R Greathouse IV, Sep 26 2012
(PARI) {a(n) = ([0, 1, 1; 1, 1, 0; 0, 2, 0]^n)[1, 1]}; /* Michael Somos, Nov 18 2020 */
(Magma) R<x>:=PowerSeriesRing(Integers(), 50); Coefficients(R!( (1-x)/(1-x-x^2-2*x^3) )); // G. C. Greubel, Jun 28 2019
(Sage) ((1-x)/(1-x-x^2-2*x^3)).series(x, 50).coefficients(x, sparse=False) # G. C. Greubel, Jun 28 2019
(GAP) a:=[1, 0, 1];; for n in [4..50] do a[n]:=a[n-1]+a[n-2]+2*a[n-3]; od; a; # G. C. Greubel, Jun 28 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
N. J. A. Sloane, Nov 17 2002
STATUS
approved