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-4 of 4 results.

A065440 a(n) = (n-1)^n.

Original entry on oeis.org

1, 0, 1, 8, 81, 1024, 15625, 279936, 5764801, 134217728, 3486784401, 100000000000, 3138428376721, 106993205379072, 3937376385699289, 155568095557812224, 6568408355712890625, 295147905179352825856, 14063084452067724991009, 708235345355337676357632
Offset: 0

Views

Author

Len Smiley, Nov 17 2001

Keywords

Comments

a(n) is the number of functions from {1,2,...,n} into {1,2,...,n} that have no fixed points.
The probability that a random function from {1,2,...,n} into {1,2,...,n} has no fixed point is equal to a(n)/n^n; it tends to 1/e when n tends to infinity. - Robert FERREOL, Mar 29 2017

Crossrefs

Essentially the same as A007778 - note T(x) = -W(-x).
Column k=0 of A055134.
Row sums of A350452.

Programs

Formula

a(n) = A007778(n-1).
E.g.f.: x/(T(x)*(1-T(x))) (where T(x) is Euler's tree function, the E.g.f. for n^(n-1)) (see A000169).
a(n) = Sum_{k=0..n} (-1)^k*binomial(n,k)*n^(n-k). - Robert FERREOL, Mar 28 2017
a(n) = Sum_{k=0..n} (-1)^k*binomial(n+2,k+2)*(k+1)*(2*k+n+3)^n. - Vladimir Kruchinin, Aug 13 2025

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

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)).

A351413 a(n) is the maximum number of stable matchings in the Latin Stable Marriage Problem of order n.

Original entry on oeis.org

1, 2, 3, 10, 9, 48, 61
Offset: 1

Views

Author

Dan Eilers, Feb 10 2022

Keywords

Comments

In the Latin Stable Marriage Problem of order n, the sum of a man and woman's rankings of each other is n+1. This implies that the men's and women's ranking tables are Latin squares. As a subproblem of the Stable Marriage Problem, Latin instances provide lower bounds for the maximum number of stable matchings in the general problem, such as A005154 and A065982. For sizes 1 to 4, Latin instances provide exact bounds; they are conjectured to provide exact bounds for sizes a power of 2; they provide the best lower bounds known for sizes 6, 10, 12, and 24, of 48, 1000, 6472, and 126112960, respectively.
The next term, a(8), is conjectured to be 268, consistent with A005154. The minimum number of stable matchings for Latin instances of order n is n, and is realized for the cyclic group of order n. The average number of stable matchings is 7 for n=4 (cf. A351430 showing an average of about 1.5 for the general problem), and benefits from avoidance of mutual first choices and more generally the lack of overlap between the men's and women's preferred matchings. The Latin squares of A005154 and A065982 can be interpreted as multiplication tables of groups, n-th powers of the cyclic group C2 and n-th dihedral groups, respectively.
The sequence decreases from a(4)=10 to a(5)=9, in contrast to the corresponding sequence for the general problem, which Thurber showed to be strictly increasing. This has motivated the study of less restrictive subproblems, such as pseudo-Latin squares (A069124, A069156), Latin x Latin instances (A344664, A344665, A343697), instances where participants have different first choices (A343475, A343694, A343695), or instances with unspecified/tied/template rankings (A284458 with only first choices specified).
The sequence is empirically derived, originally based on reduced Latin squares (A000315). There are fewer instances to try using RC-equivalent Latin squares (A123234) instead of reduced Latin squares.

Examples

			Maximal instance of order 2 with 2 stable matchings:
  12
  21
Maximal instance of order 3 with 3 stable matchings:
  123
  231
  312
Maximal instance of order 4 with 10 stable matchings (group C2xC2):
  1234
  2143
  3412
  4321
Maximal instance of order 5 with 9 stable matchings:
  12345
  21453
  34512
  45231
  53124
Maximal instance of order 6 with 48 stable matchings (Dihedral group):
  123456
  214365
  365214
  456123
  541632
  632541
Maximal instance of order 7 with 61 stable matchings:
  1234567
  2316745
  3125476
  4657312
  5743621
  6471253
  7562134
		

References

  • C. Converse, Lower bounds for the maximum number of stable pairings for the general marriage problem based on the latin marriage problem, Ph. D. Thesis, Claremont Graduate School, Claremont, CA (1992) [Examples are from 69-70].

Crossrefs

Cf. A005154 (powers of 2), A065982 (multiples of 2), A069156 (not necessarily Latin), A000315 (reduced Latin squares), A123234 (RC-equivalent Latin squares).
Showing 1-4 of 4 results.