login
a(n) is the number of ways to make a Secret Santa assignment among n couples such that (i) no one gets their partner's name, (ii) if A gets B's name, B does not get A's name, and (iii) if A gets B's name, then A's partner does not get B's partner's name.
1

%I #16 Jul 09 2024 08:47:54

%S 0,0,32,1200,126720,17862400,3403153920

%N a(n) is the number of ways to make a Secret Santa assignment among n couples such that (i) no one gets their partner's name, (ii) if A gets B's name, B does not get A's name, and (iii) if A gets B's name, then A's partner does not get B's partner's name.

%C Equivalent to the number of derangements of [2n] such that (i) there are no 2-cycles, (ii) neither k nor k+n maps to the other (k <= n), and (iii) we never have that both k maps to m and k+n maps to m+n.

%C a(n) <= A367537(n) <= A038205(2n) <= A000166(2n), and all the inequalities are strict except for n = 1.

%C Inspired by a question from a coworker about enumerating all possible Secret Santa assignments for an actual Secret Santa exchange for Xmas 2023, subject to these constraints.

%Y Cf. A000166, A038205, A367537.

%K nonn,more

%O 1,3

%A _Jeremy F. Alm_, Nov 21 2023