A258041 Number of 312-avoiding derangements of {1,2,...,n}.
1, 0, 1, 1, 4, 10, 31, 94, 303, 986, 3284, 11099, 38024, 131694, 460607, 1624451, 5771532, 20640334, 74246701, 268478962, 975436348, 3559204700, 13037907692, 47931423574, 176792821643, 654078238224, 2426705590840, 9026907769955
Offset: 0
Keywords
Examples
a(4) = 4 counts 2143, 2341, 3421, 4321.
Links
- Vaclav Kotesovec, Table of n, a(n) for n = 0..1000
- Aaron Robertson, Dan Saracino, and Doron Zeilberger, Refined Restricted Permutations, arXiv:math/0203033 [math.CO], 2002.
- Aaron Robertson, Dan Saracino, and Doron Zeilberger, Refined Restricted Permutations, Annals of Combinatorics 6 (2002) 427-444.
Programs
-
Mathematica
a[n_, k_] /; k >= n := CatalanNumber[n] a[n_, k_] /; 0 <= k < n := a[n, k] = Sum[a[j - 1, k + 1] a[n - j, k] , {j, k}] + Sum[a[j - 1, k + 1] a[n - j, k],{j, k + 2, n}] a[n_] := a[n, 0] Table[a[n], {n, 0, 30}]
Formula
G.f.: 1/(1 + C(0)x -
x/(1 + C(1)x^2 -
x/(1 + C(2)x^3 -
x/(1 + C(3)x^4 -
x/(1 + C(4)x^5 -
x/(1 + C(5)x^6 - ...)))))))) [continued fraction] where C(n) = A000108(n) is the n-th Catalan number.
Comments