OFFSET
1,2
LINKS
Colin Barker, Table of n, a(n) for n = 1..1000
Lara Pudwell, Systematic Studies in Pattern Avoidance, 2005.
Index entries for linear recurrences with constant coefficients, signature (3, -2, -1, 1).
FORMULA
G.f.: x*(1 - x + x^2 + 2*x^3) / ((1 - x)^2*(1 - x - x^2)).
a(n) = 2*A000045(n+3)-3*n-2. - R. J. Mathar, Aug 05 2008
From Colin Barker, Oct 20 2017: (Start)
a(n) = 1 + (2^(1-n)*((1-sqrt(5))^n*(-2+sqrt(5)) + (1+sqrt(5))^n*(2+sqrt(5))))/sqrt(5) - 3*(1 + n).
a(n) = 3*a(n-1) - 2*a(n-2) - a(n-3) + a(n-4) for n>4.
(End)
PROG
(PARI) Vec(x*(1 - x + x^2 + 2*x^3) / ((1 - x)^2*(1 - x - x^2)) + O(x^40)) \\ Colin Barker, Oct 20 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lara Pudwell, Feb 26 2006
EXTENSIONS
Extended beyond a(30) by R. J. Mathar, Aug 05 2008
STATUS
approved