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.
%I A344664 #17 Feb 11 2022 12:13:11 %S A344664 1,2,24,13824,216760320,917676490752000,749944260264355430400000, %T A344664 293457967200879687743551498616832000, %U A344664 84112872283641495670736269523436185936222748672000,27460610008848610956892895086773773421767179663217968124264448000000 %N A344664 a(n) is the number of preference profiles in the stable marriage problem with n men and n women where both the men's and the women's preferences form a Latin square when arranged in a matrix. In addition, it is possible to arrange all people into n man-woman couples such that they rank each other first. %C A344664 Two people who rank each other first are called soulmates. Thus, the profiles in this sequence have n pairs of soulmates. %C A344664 The profiles with n pairs of soulmates are counted by sequence A343698. The profiles such that the men's preferences form a Latin square are counted by A343696. The profiles such that both men's and women's preferences form a Latin square are counted by A343697. The profiles in this sequence are the intersection of profiles in A343698 and A343697. %C A344664 Both the men- and the women-proposing Gale-Shapley algorithm on the preference profiles described by this sequence end in one round. %H A344664 Matvey Borodin, Eric Chen, Aidan Duncan, Tanya Khovanova, Boyan Litchev, Jiahe Liu, Veronika Moroz, Matthew Qian, Rohith Raghavan, Garima Rastogi, and Michael Voigt, <a href="https://arxiv.org/abs/2201.00645">Sequences of the Stable Matching Problem</a>, arXiv:2201.00645 [math.HO], 2021. %H A344664 Wikipedia, <a href="https://en.wikipedia.org/wiki/Gale%E2%80%93Shapley_algorithm">Gale-Shapley algorithm</a>. %F A344664 a(n) = A002860(n)^2 / n!. %F A344664 a(n) = A000479(n) * A002860(n). %e A344664 For n = 3, there are A002860(3) = 12 Latin squares of order 3. Thus, there are A002860(3) = 12 ways to set up the men's preference profiles. After that, the women's preference profiles form a Latin square with a fixed first column, as the first column is uniquely defined to generate 3 pairs of soulmates. Thus, there are A002860(3)/3! = 12/6 = 2 ways to set up the women's preference profiles, making a(3) = 12 * 2 = 24 preference profiles. %Y A344664 Cf. A000479, A002860, A185141, A343696, A343697, A343698, A344665. %K A344664 nonn %O A344664 1,2 %A A344664 _Tanya Khovanova_ and MIT PRIMES STEP Senior group, Jun 01 2021 %E A344664 Corrected by _Tanya Khovanova_, Aug 17 2021