cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A272363 #31 Oct 11 2018 09:32:02
%S A272363 1,1,0,2,12,64,220,1886,16346,142420,1302106,14467384,177079358
%N 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.
%H A272363 Mok-Kong Shen and Tsen-Pao Shen, <a href="http://dx.doi.org/10.1090/S0002-9904-1962-10842-8">Number theory Research Problem 39</a>, Bull. Amer. Math. Soc. 68 (1962), 557.
%F A272363 a(n) >= A002968(n). - _Altug Alkan_, Oct 05 2018
%F A272363 a(n) <= A060963(n). - _Chai Wah Wu_, Oct 08 2018
%e A272363 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.
%o A272363 (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;}
%o A272363 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;}
%o A272363 (Python)
%o A272363 from sympy.utilities.iterables import multiset_partitions
%o A272363 def A272363(n):
%o A272363     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
%Y A272363 Cf. A002968, A007631, A060963.
%K A272363 nonn,more
%O A272363 0,4
%A A272363 _Michel Marcus_, Apr 27 2016
%E A272363 a(0), a(7)-a(10) from _Alois P. Heinz_, Oct 05 2018
%E A272363 a(11)-a(12) from _Giovanni Resta_, Oct 11 2018