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.

Showing 1-7 of 7 results.

A343700 a(n) is the number of preference profiles in the stable marriage problem with n men and n women such that there are no pairs of people who rank each other first.

Original entry on oeis.org

0, 2, 9984, 28419102720, 175302739963548794880, 5801674463718565478400000000000000, 2113937863028052653298578438638220083200000000000000, 15500609395854457241550377325238753195602871153217230602240000000000000000
Offset: 1

Views

Author

Tanya Khovanova and MIT PRIMES STEP Senior group, May 26 2021

Keywords

Comments

Two people who rank each other first are called soulmates. Thus, this sequence enumerates the profiles without soulmates.
This sequence is in contrast to the sequence A343698 which enumerates profiles with n pairs of soulmates.
The preference profiles with the most stable matchings do not have soulmates.

Examples

			For n=2, suppose A and B are the men and C and D are the women, then the only two possibilities are the following: a) A prefers C, C prefers B, B prefers D, and D prefers A; 2) A prefers D, D prefers B, B prefers C, and C prefers A.
		

Crossrefs

Programs

  • Mathematica
    Table[Total[
      Table[(-1)^i Binomial[n, i]^2 (n - 1)!^(2 i) i! n!^(2 n - 2 i), {i,
        0, n}]], {n, 10}]
  • PARI
    a(n) = sum(i=0, n, ((-1)^i * binomial(n, i)^2 * (n - 1)!^(2*i) * i! * n!^(2*n - 2*i))); \\ Michel Marcus, Jan 20 2023

Formula

a(n) = Sum_{i = 0..n} ((-1)^i * binomial(n, i)^2 * (n - 1)!^(2i) * i! * n!^(2n - 2i)).
a(n) = A350558(n)*A284458(n). - Dan Eilers, Jan 17 2023

A343699 a(n) is the number of preference profiles in the stable marriage problem with n men and n women with n - 1 pairs of soulmates (people who rank each other first).

Original entry on oeis.org

0, 12, 9216, 2418647040, 913008685901414400, 1348114387776307200000000000000, 17038241273713946059743990644736000000000000000, 3522407871857134068576369034449842450587691306188800000000000000000
Offset: 1

Views

Author

Tanya Khovanova and MIT PRIMES STEP Senior group, May 26 2021

Keywords

Comments

Such profiles have exactly one stable matching, where soulmates are married to each other.
The men-proposing Gale-Shapley algorithm when used on these preference profiles will end in j rounds if the man in the non-soulmate pair ranks his partner as j-th. A similar statement is true for the women-proposing Gale-Shapley algorithm.

Examples

			When n = 2, there are 2 ways to pick the man in the soulmate pair and 2 ways to pick the woman in the soulmate pair. After this, the soulmate's preference profiles are fixed. There are 4 ways to complete the profiles for the other two people, but 1 of the ways creates a second pair of soulmates, which is forbidden. Thus, there are 12 profiles with exactly one pair of soulmates.
		

Crossrefs

Programs

  • Mathematica
    Table[(n - 1)!^(2 n + 1) n^2 (n^2 - 1), {n, 10}]

Formula

a(n) = (n - 1)!^(2n + 1) * n^2 * (n^2 - 1).

A344662 a(n) is the number of preference profiles in the stable marriage problem with n men and n women so that they form n pairs of people of different genders who rank each other first, and so that the men's preferences arranged in a matrix form a Latin square.

Original entry on oeis.org

1, 2, 96, 746496, 1284211998720, 2427160677580800000000, 6166762687851449045483520000000000, 45287412266290145430585597857888710164480000000000, 1555956528335898586085189699733983238252540690603399394099200000000000, 395245501240598487865502317687285665641954608158944047815164739503046322343116800000000000000
Offset: 1

Views

Author

Tanya Khovanova and MIT PRIMES STEP Senior group, May 30 2021

Keywords

Comments

Two people who rank each other first are called soulmates. The profiles in this sequence are required to have n pairs of soulmates.
The profiles with n pairs of soulmates are counted by sequence A343698. The profiles such that the men's preference form a Latin square are counted by A343696. The profiles in this sequence are the intersection of profiles in A343696 and A343698.
The Gale-Shapley algorithm (both men-proposing and women-proposing) on the preference profiles described by this sequence ends in one round.

Examples

			For n = 3, there are A002860(3) = 12 ways to set up the men's preference profiles, where A002860(n) is the number of Latin squares of order n. The men's first preferences set the women's first preferences, so we only need to complete the women's profiles with other preferences, which can be done in 2!^3 = 8 ways. Thus, A344662(3) = 12 * 8 = 96.
		

Crossrefs

Formula

a(n) = (n-1)!^n * A002860(n) = A343696(n)/n^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.

Original entry on oeis.org

1, 2, 24, 13824, 216760320, 917676490752000, 749944260264355430400000, 293457967200879687743551498616832000, 84112872283641495670736269523436185936222748672000, 27460610008848610956892895086773773421767179663217968124264448000000
Offset: 1

Views

Author

Tanya Khovanova and MIT PRIMES STEP Senior group, Jun 01 2021

Keywords

Comments

Two people who rank each other first are called soulmates. Thus, the profiles in this sequence have n pairs of soulmates.
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.
Both the men- and the women-proposing Gale-Shapley algorithm on the preference profiles described by this sequence end in one round.

Examples

			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.
		

Crossrefs

Formula

a(n) = A002860(n)^2 / n!.
a(n) = A000479(n) * A002860(n).

Extensions

Corrected by Tanya Khovanova, Aug 17 2021

A350558 a(n) = (n-1)!^(2n).

Original entry on oeis.org

1, 1, 64, 1679616, 63403380965376, 8916100448256000000000000, 10061319724179153710638694400000000000000, 173335925289013982808975076100021379095592960000000000000000, 79317573895713454077105543742169655162315106629579798748776628224000000000000000000
Offset: 1

Views

Author

Dan Eilers, Feb 15 2022

Keywords

Comments

a(n) is the number of ways to arrange the remaining preferences in the stable marriage problem of order n after the first choice of each participant has been determined. The first choices are often treated separately in order to avoid mutual first choices, or to avoid multiple participants with the same first choice.

Crossrefs

Programs

  • Mathematica
    Table[(n-1)!^(2n),{n,1,9}]

Formula

a(n) = (n-1)!^(2n).
a(n) = A343700(n)/A284458(n).
a(n) = A343698(n)/A000142(n).
a(n) = A343699(n)/((n-1)!*n^2*(n^2-1)).
a(n) = A343699(n)/(A000142(n)*n*(n^2-1)).

A344691 Irregular triangle T(n,k) read by rows, where T(n,k) is the number of preference profiles in the stable marriage problem with n men and n women such that there exists a stable matching with an egalitarian cost of k.

Original entry on oeis.org

0, 1, 0, 0, 0, 2, 8, 6, 0, 0, 0, 0, 0, 384, 2304, 7416, 13860, 15912, 10836, 3564, 0, 0, 0, 0, 0, 0, 0, 40310784, 322486272, 1394454528, 4263542784, 9856161792, 17805053952, 25557163776, 29223099648, 26437927680, 18541903680, 9633334320, 3379380192, 626260608, 0
Offset: 1

Views

Author

Tanya Khovanova and MIT PRIMES STEP Senior group, Jun 22 2021

Keywords

Comments

The egalitarian cost of a stable matching is the sum of the mutual rankings of the people in couples.
The lowest and, therefore, optimal mutual ranking of two people is 2, which occurs when they rank each other first. Thus the smallest possible egalitarian cost of a stable matching with n men and n women is 2n. So for k < 2n, T(n,k) = 0.
Sequence A344692 counts the profiles with multiplicity equal to the number of different stable matchings with an egalitarian cost of k.

Examples

			The first row is 0, 1. The second row is 0, 0, 0, 2, 8, 6. The n-th row starts with 2n-1 zeros. The numbers of terms in rows 3 and 4 are 12 and 20 respectively.
If two people rank each other first, they are called soulmates. Therefore, if the egalitarian cost is 2n, then there are n pairs of soulmates. Sequence A343698(n,2n) counts the preference profiles with n men and n women that have n pairs of soulmates. Thus, we have T(n,2n) = A343698(n). If n=2 and k=4, we have two pairs of soulmates. There are two preference profiles like this. In the first profile, the first man and the first woman are soulmates as well as the second man and the second woman. In the second profile, the first man and the second woman as well as the second man and the first woman are soulmates. Thus T(2,4)=2.
		

Crossrefs

A344692 Irregular triangle read by rows in which T(n,k) is the number of stable matchings in the stable marriage problem with n men and n women such that there exists a stable matching with an egalitarian cost of k.

Original entry on oeis.org

0, 1, 0, 0, 0, 2, 8, 8, 0, 0, 0, 0, 0, 384, 2304, 7488, 14592, 18072, 13104, 4380, 0, 0, 0, 0, 0, 0, 0, 40310784, 322486272, 1397440512, 4299816960, 10080681984, 18632540160, 27586068480, 32664453120, 30544625664, 21941452800, 11480334336, 3963617280, 707788800, 0
Offset: 1

Views

Author

Tanya Khovanova and MIT PRIMES STEP Senior group, Jun 22 2021

Keywords

Comments

The egalitarian cost of a stable matching is the sum of the mutual rankings of the people in couples.
Each preference profile with n men and women that has m different stable matchings with an egalitarian cost of k contributes m to T(n,k). The sequence that counts these m matchings as one is A344691.
The lowest and, therefore, optimal mutual ranking of two people is 2, which occurs when they rank each other first. Thus, the smallest possible egalitarian cost of a stable matching with n men and n women is 2*n. So, for k < 2*n, T(n,k) = 0.

Examples

			Triangle begins:
  0, 1;
  0, 0, 0, 2, 8,   8;
  0, 0, 0, 0, 0, 384, 2304,     7488,     14592,      18072, 13104, 4380;
  0, 0, 0, 0, 0,   0,    0, 40310784, 322486272, 1397440512, ...        ;
  ...
The n-th row starts with 2*n-1 zeros.
The total number of terms in row 3 and 4 is 12 and 20 respectively.
If two people rank each other first, they are called soulmates. Therefore, if the egalitarian cost is 2*n then there are n pairs of soulmates.
A343698(n) counts preference profiles with n men and n women that have n pairs of soulmates. Moreover, if we have n pairs of soulmates in a profile, there's only one stable matching with egalitarian cost 2n. Thus, we have T(n,2n) = A343698(n).
If n = 2 and k = 4, we have two pairs of soulmates. There are two preference profiles like this. In the first profile, the first man and the first woman are soulmates as well as the second man and the second woman. In the second profile, the first man and the second woman as well as the second man and the first woman are soulmates. Thus T(2,4) = 2.
		

Crossrefs

Showing 1-7 of 7 results.