OFFSET
1,2
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..5000
Lara Pudwell, Systematic Studies in Pattern Avoidance, 2005.
Index entries for linear recurrences with constant coefficients, signature (2,-1).
FORMULA
G.f.: x*(1 + 2*x^2 + 4*x^3) / (1 - x)^2.
For n >= 3, a(n) = 7*n - 16. - Franklin T. Adams-Watters, Sep 16 2006
a(n) = 2*a(n-1) - a(n-2) for n=4. - Colin Barker, Oct 24 2017
a(n) = A017041(n-3) for n > 2. - Georg Fischer, Oct 07 2018
E.g.f.: exp(x)*(7*x - 16) + 2*(x^2 + 5*x + 8). - Stefano Spezia, Oct 10 2022
MAPLE
t := taylor((4*x^3+2*x^2+1)*x/(x-1)^2, x, 51):seq(coeff(t, x, n), n=1..50); # Nathaniel Johnston, Apr 27 2011
PROG
(PARI) Vec(x*(1 + 2*x^2 + 4*x^3) / (1 - x)^2 + O(x^70)) \\ Colin Barker, Oct 24 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lara Pudwell, Feb 26 2006
STATUS
approved