OFFSET
4,1
LINKS
R. H. Hardin, Table of n, a(n) for n=4..500
W. Kuszmaul, Fast Algorithms for Finding Pattern Avoiders and Counting Pattern Occurrences in Permutations, arXiv preprint arXiv:1509.08216 [cs.DM], 2015.
Index entries for linear recurrences with constant coefficients, signature (2,0,0,-1).
FORMULA
G.f.: -x^4*(-14+3*x+5*x^2+8*x^3) / ( (x-1)*(x^3+x^2+x-1) ). - R. J. Mathar, Nov 28 2011
a(n) = a(n-1) + a(n-2) + a(n-3) - 2. - Greg Dresden, Feb 09 2020
a(n) = 2*a(n-1)-a(n-4). - Wesley Ivan Hurt, Apr 26 2021
MATHEMATICA
LinearRecurrence[{2, 0, 0, -1}, {14, 25, 45, 82}, 50] (* G. C. Greubel, Sep 18 2017 *)
PROG
(PARI) x='x+O('x^50); Vec(-x^4*(-14+3*x+5*x^2+8*x^3)/((x-1)*(x^3+x^2+x-1) )) \\ G. C. Greubel, Sep 18 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
R. H. Hardin, Aug 14 2009
STATUS
approved