login
A391664
Number of permutations p of [2*n] satisfying Sum_{i=1..2*n} (p(i)-i)^2 = 2*n.
3
1, 1, 1, 9, 47, 177, 691, 3001, 13274, 57912, 252497, 1109961, 4908590, 21763925, 96687202, 430528955, 1921312439, 8589901368, 38463789496, 172476073461, 774406324182, 3481116734538, 15664952999940, 70560301836647, 318110972956234, 1435335202743129, 6481225838857230
OFFSET
0,4
COMMENTS
Number of permutations of [2*n] with "entropy" equal to 2*n.
LINKS
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