OFFSET
0,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 0..1000
M. H. Albert and M. D. Atkinson, Simple permutations and pattern restricted permutations, Discr. Math., 300 (2005), 1-15.
Index entries for linear recurrences with constant coefficients, signature (5,-9,8,-2,1).
MATHEMATICA
CoefficientList[ Series[x*(x^4 - x^3 + 4x^2 - 3x + 1)/(1 - 5x + 9x^2 - 8x^3 + 2x^4 - x^5), {x, 0, 30}], x] (* Robert G. Wilson v, Oct 15 2005 *)
LinearRecurrence[{5, -9, 8, -2, 1}, {0, 1, 2, 5, 14, 40}, 40] (* Harvey P. Dale, Dec 25 2021 *)
PROG
(PARI) a(n)=if(n, ([0, 1, 0, 0, 0; 0, 0, 1, 0, 0; 0, 0, 0, 1, 0; 0, 0, 0, 0, 1; 1, -2, 8, -9, 5]^(n-1)*[1; 2; 5; 14; 40])[1, 1], 0) \\ Charles R Greathouse IV, Jun 03 2026
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
N. J. A. Sloane, Oct 14 2005
STATUS
approved
