OFFSET
1,2
COMMENTS
a(n) is the number of permutations pi of length n such that pi and pi^2 both avoid 132 and 3421. - Colin Defant, Jul 24 2019
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
Miklos Bona and Rebecca Smith, Pattern Avoidance in Permutations and Their Squares, arXiv:1901.00026 [math.CO], 2019.
Amanda Burcroff and Colin Defant, Pattern-Avoiding Permutation Powers, arXiv:1907.09451 [math.CO], 2019.
Lara Pudwell, Systematic Studies in Pattern Avoidance, 2005.
Index entries for linear recurrences with constant coefficients, signature (3, -3, 1).
FORMULA
G.f.: x*(1 - x + 2*x^2 + 2*x^3)/(1-x)^3.
For n >= 2, a(n) = 2*n^2 - 7*n + 8. - Franklin T. Adams-Watters, Sep 16 2006
a(n) = A096376(n-2), n > 1. - R. J. Mathar, Aug 10 2008
E.g.f.: -8 - 2*x + (8 - 5*x + 2*x^2)*exp(x). - G. C. Greubel, Aug 10 2019
MAPLE
MATHEMATICA
Join[{1}, LinearRecurrence[{3, -3, 1}, {2, 5, 12}, 80]] (* Vladimir Joseph Stephan Orlovsky, Feb 18 2012 *)
PROG
(PARI) vector(50, n, if(n<2, n, 2*n^2-7*n+8)) \\ G. C. Greubel, Aug 10 2019
(Magma) [n lt 2 select n else 2*n^2-7*n+8: n in [1..50]]; // G. C. Greubel, Aug 10 2019
(Sage) [1]+[2*n^2-7*n+8 for n in (2..50)] # G. C. Greubel, Aug 10 2019
(GAP) Concatenation([1], List([2..50], n-> 2*n^2-7*n+8)); # G. C. Greubel, Aug 10 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Lara Pudwell, Feb 26 2006
STATUS
approved