login
A272363
Number of ways to group the first 2*n natural numbers into n pairs (xi,yi) with yi>xi, and such that the 2*n numbers xi+yi and xi-yi are all different.
4
1, 1, 0, 2, 12, 64, 220, 1886, 16346, 142420, 1302106, 14467384, 177079358
OFFSET
0,4
LINKS
Mok-Kong Shen and Tsen-Pao Shen, Number theory Research Problem 39, Bull. Amer. Math. Soc. 68 (1962), 557.
FORMULA
a(n) >= A002968(n). - Altug Alkan, Oct 05 2018
a(n) <= A060963(n). - Chai Wah Wu, Oct 08 2018
EXAMPLE
For n=3, ((1,5), (2,3), (4,6)) is an instance of such grouping. ((2,3), (1,5), (4,6)) is considered to be the same grouping. The other one is ((1,3), (2,6), (4,5)). So a(3) = 2.
PROG
(PARI) okperm(vp, n) = {for (k=1, n-1, if (vp[k] > vp[k+1], return (0)); ); for (k=1, n, if (vp[k+n] <= vp[k], return (0)); ); 1; }
a(n) = {nb = 0; nn = 2*n; for (j=0, nn!-1, vp = numtoperm(nn, j); if (okperm(vp, n), vs = vector(n, k, vp[k]+vp[k+n]); vd = vector(n, k, vp[k]-vp[k+n]); if (#vs + #vd == #Set(concat(vs, vd)), nb++); ); ); nb; }
(Python)
from sympy.utilities.iterables import multiset_partitions
def A272363(n):
return 1 if n == 0 else sum(1 for p in multiset_partitions(list(range(1, 2*n+1)), n) if max(len(d) for d in p) == 2 and len(set([sum(d) for d in p]))+len(set([abs(d[0]-d[1]) for d in p])) == 2*n) # Chai Wah Wu, Oct 08 2018
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Michel Marcus, Apr 27 2016
EXTENSIONS
a(0), a(7)-a(10) from Alois P. Heinz, Oct 05 2018
a(11)-a(12) from Giovanni Resta, Oct 11 2018
STATUS
approved