OFFSET
0,4
COMMENTS
Number of permutations of [2*n] with "entropy" equal to 2*n.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..100
FORMULA
a(n) = A175929(2*n,n).
EXAMPLE
a(0) = 1: the empty permutation.
a(1) = 1: 21.
a(2) = 1: 2143.
a(3) = 9: 123564, 123645, 124536, 125346, 134256, 142356, 214365, 231456, 312456.
a(4) = 47: 12345876, 12347658, 12354786, 12354867, ..., 31245768, 31246578, 31254678, 32145678.
MAPLE
b:= proc(s, t) option remember; (n-> `if`(add((i-s[-i])^2, i=1..n)<t
or add((i-s[i])^2, i=1..n)>t, 0, `if`(n=0, 1, add((w->
`if`(w<0, 0, b(s minus {j}, w)))(t-(n-j)^2), j=s))))(nops(s))
end:
a:= n-> b({$1..2*n}, 2*n):
seq(a(n), n=0..26);
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Dec 15 2025
STATUS
approved
