OFFSET
0,4
EXAMPLE
a(3) = 6 because the 6 permutations of [6] where the number of elements moved left exceeds the number of elements moved right by 3 are:
[1, 6, 2, 3, 4, 5] (Fixed: {1}, Right: {2->6}, Left: {3->2, 4->3, 5->4, 6->5})
[6, 2, 1, 3, 4, 5] (Fixed: {2}, Right: {1->6}, Left: {3->1, 4->3, 5->4, 6->5})
[6, 1, 3, 2, 4, 5] (Fixed: {3}, Right: {1->6}, Left: {2->1, 4->2, 5->4, 6->5})
[6, 1, 2, 4, 3, 5] (Fixed: {4}, Right: {1->6}, Left: {2->1, 3->2, 5->3, 6->5})
[6, 1, 2, 3, 5, 4] (Fixed: {5}, Right: {1->6}, Left: {2->1, 3->2, 4->3, 6->4})
[5, 1, 2, 3, 4, 6] (Fixed: {6}, Right: {1->5}, Left: {2->1, 3->2, 4->3, 5->4}).
PROG
(PARI) E(n, k) = sum(j=0, k, (-1)^j*binomial(n+1, j)*(k+1-j)^n);
a271697(n, k) = sum(j=0, n, (-1)^(n-j)*binomial(n, j)*E(j, k));
a(n) = sum(e=0, n\2, binomial(2*n, n+2*e)*a271697(n+2*e, e));
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Apr 23 2026
STATUS
approved
