OFFSET
0,1
COMMENTS
With offset of 5 this sequence is the 4th row of the tribonacci array A136175.
For n>0, a(n) is the number of ways to tile a strip of length n with squares, dominoes, and trominoes, such that there must be exactly one "special" square (say, of a different color) in the first three cells. - Greg Dresden and Emma Li, Aug 17 2024
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000 (terms 0..200 from Robert Price)
Martin Burtscher, Igor Szczyrba, and RafaĆ Szczyrba, Analytic Representations of the n-anacci Constants and Generalizations Thereof, Journal of Integer Sequences, Vol. 18 (2015), Article 15.4.5.
Index entries for linear recurrences with constant coefficients, signature (1,1,1).
FORMULA
G.f.: (2-x-x^2)/(1-x-x^2-x^3).
a(n) = K(n) - T(n+1) + T(n), where K(n) = A001644(n), T(n) = A000073(n+1). - G. C. Greubel, Apr 23 2019
MATHEMATICA
LinearRecurrence[{1, 1, 1}, {2, 1, 2}, 34] (* Ray Chandler, Dec 08 2013 *)
PROG
(PARI) a(n)=([0, 1, 0; 0, 0, 1; 1, 1, 1]^n*[2; 1; 2])[1, 1] \\ Charles R Greathouse IV, Jun 11 2015
(PARI) my(x='x+O('x^40)); Vec((2-x-x^2)/(1-x-x^2-x^3)) \\ G. C. Greubel, Apr 23 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (2-x-x^2)/(1-x-x^2-x^3) )); // G. C. Greubel, Apr 23 2019
(Sage) ((2-x-x^2)/(1-x-x^2-x^3)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 23 2019
(GAP) a:=[2, 1, 2];; for n in [4..40] do a[n]:=a[n-1]+a[n-2]+a[n-3]; od; a; # G. C. Greubel, Apr 23 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Abel Amene, Jul 29 2012
STATUS
approved