|
|
A072948
|
|
Number of permutations p of {1,2,3,...,2n} such that Sum_{k=1..2n} abs(k-p(k)) = 2n.
|
|
2
|
|
|
1, 7, 46, 327, 2350, 17222, 127508, 952299, 7159090, 54107670, 410729140, 3129241874, 23914923644, 183254996828, 1407497158968, 10832287881639, 83516348514010, 644935028526278, 4987483388201684, 38619491922881310, 299390833303838980, 2323441087636417604
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
LINKS
|
|
|
FORMULA
|
This is impossible if the number of symbols is odd.
|
|
MATHEMATICA
|
f[n_] := If[n == 1, 1, Floor[n/2] t^Floor[(n - 1)/2] z];
F[t_, z_] = ContinuedFractionK[f[i], 1, {i, 1, 8}];
a[n_] := a[n] = SeriesCoefficient[F[t, z], {z, 0, 2 n}, {t, 0, n}];
|
|
PROG
|
(PARI) a(n)=sum(k=1, n!, if(sum(i=1, n, abs(i-component(numtoperm(n, k), i)))-n, 0, 1))
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
a(13)-a(16) from Alois P. Heinz, May 02 2014 using formula given by Guay-Paquey and Petersen
|
|
STATUS
|
approved
|
|
|
|