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.

A326404 Triangle T(n,k) read by rows: T(n,k) = number of ways of seating n people around a table for the second time so that k pairs are maintained. Rotated sequences are counted as one.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 0, 0, 2, 0, 0, 4, 0, 2, 2, 0, 10, 10, 0, 2, 6, 24, 30, 40, 18, 0, 2, 46, 140, 224, 182, 98, 28, 0, 2, 354, 1088, 1480, 1280, 604, 192, 40, 0, 2, 3106, 9000, 12006, 9450, 4878, 1494, 330, 54, 0, 2, 29926, 83480, 107170, 82840, 41620, 14152, 3100, 520, 70, 0, 2
Offset: 0

Views

Author

Witold Tatkiewicz, Aug 01 2019

Keywords

Comments

Definition requires "pairs" and for n=0 it is assumed that there is 1 way of seating 0 people around a table for the second time so that 0 pairs are maintained and 1 person forms only one pair with him/herself. Therefore T(0,0)=1, T(1,0)=0 and T(1,1)=1.
Sum of row n is equal to (n-1)! for n > 1.
Conjecture: The weighted average of each row using k as weights converges to 2 for large n and is given by the following formula: (Sum_{k} T(n,k)*k)/(Sum_{k} T(n,k)) = 2/(n-1) + 2.

Examples

			Assuming the initial order was {1,2,3,4,5} (therefore 1 and 5 form a pair as the first and last persons are neighbors in the case of a round table) there are 5 sets of ways of seating them again so that 3 pairs are conserved: {1,2,3,5,4}, {2,3,4,1,5}, {3,4,5,2,1}, {4,5,1,3,2}, {5,1,2,4,3}. Since within each set we do not allow for circular symmetry (e.g., {1,2,3,5,4} and its rotation to form {2,3,5,4,1} are counted as one) but we allow reflection ({1,2,3,5,4} and {4,5,3,2,1} are considered distinct), the total number of ways is 5*2 and therefore T(5,3)=10.
Unfolded table with n individuals (rows) forming k pairs (columns):
    0    1    2    3    4    5    6    7
0   1
1   0    1
2   0    0    1
3   0    0    0    2
4   0    0    4    0    2
5   2    0   10   10    0    2
6   6   24   30   40   18    0    2
7  46  140  224  182   98   28    0    2
		

Crossrefs

Cf. A078603 (column k=0).
Sum of n-th row is A000142(n-1) for n > 0.
Cf. A326390 (accounting for rotation and reflection symmetry), A326397 (disregards reflection symmetry but allows rotation), A326411 (disregards both reflection and rotation symmetry).

Programs

  • Java
    See Links section

Formula

T(n,n) = 2 for n > 2;
T(n,n-1) = 0 for n > 1.
Conjectures:
T(n,n-2) = n^2 + n - 2 for n > 3;
T(n,n-3) = (4/3)*n^3 + 2*n^2 - (16/3)*n + 2 for n > 4;
T(n,n-4) = (25/12)*n^4 + (23/6)*n^3 - (169/12)*n^2 + (85/6)*n - 6 for n > 5;
T(n,n-5) = (52/15)*n^5 + (25/3)*n^4 - (83/3)*n^3 + (221/3)*n^2 - (299/5)*n + 26 for n > 5;
T(n,n-6) = (707/120)*n^6 + (2037/120)*n^5 - (413/8)*n^4 + (2233/8)*n^3 - (5554/15)*n^2 + (3739/10)*n - 114 for n > 6.