login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A320129 Number of ways to group the first 2*n natural numbers into n pairs (xi, yi) such that the n numbers xi + yi are all different. 3
1, 1, 2, 10, 55, 412, 3736, 40518, 505486, 7145031, 112844566, 1970286922, 37676184205 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
FORMULA
a(n) >= A272363(n).
EXAMPLE
For n = 2, a(2) = 2 since {(1,3), (2,4)} and {(1,2), (3,4)} are corresponding sets. {(2,4), (1,3)} and {(3,1), (4,2)} are considered to be the same grouping with {(1,3), (2,4)}.
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) = if(n==0, 1, {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]); if (#vs == #Set(concat(vs)), nb++); ); ); nb; } ) \\ after Michel Marcus at A272363
(Python)
from sympy.utilities.iterables import multiset_partitions
def A320129(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)) == n) # Chai Wah Wu, Oct 08 2018
CROSSREFS
Sequence in context: A175935 A216721 A122826 * A329871 A108490 A323935
KEYWORD
nonn,more
AUTHOR
Altug Alkan, Oct 06 2018
EXTENSIONS
a(11)-a(12) from Giovanni Resta, Oct 09 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 15:57 EDT 2024. Contains 371961 sequences. (Running on oeis4.)