OFFSET
0,6
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
B. Nakamura, Approaches for enumerating permutations with a prescribed number of occurrences of patterns, arXiv 1301.5080 [math.CO], 2013.
B. Nakamura, A Maple package for enumerating n-permutations with r occurrences of the pattern 123 and s occurrences of the pattern 132 [Broken link]
Index entries for linear recurrences with constant coefficients, signature (10,-40,80,-80,32).
FORMULA
G.f.: -(2*x^5+6*x^4-6*x^3+6*x^2-4*x+1)*x^4/(2*x-1)^5. - Alois P. Heinz, Apr 03 2013
a(n) = 2^(-11+n)*(1504-994*n+219*n^2-18*n^3+n^4) for n>4. - Colin Barker, Apr 14 2013
EXAMPLE
a(4) = 1: (1,2,4,3).
a(5) = 6: (2,3,5,1,4), (2,3,5,4,1), (2,5,1,3,4), (3,1,4,5,2), (4,1,2,5,3), (5,1,2,4,3).
MAPLE
# Programs can be obtained from the Nakamura link
MATHEMATICA
Join[{0, 0, 0, 0, 1}, LinearRecurrence[{10, -40, 80, -80, 32}, {6, 26, 94, 306, 934}, 27]] (* Jean-François Alcover, Feb 29 2020 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Brian Nakamura, Apr 03 2013
STATUS
approved