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 A264801 #16 Sep 05 2020 13:12:36 %S A264801 0,6,2400,6375600,45927907200,713518388352000,21216194909362252800, %T A264801 1105729617210350356224000,94398452626533646953922560000, %U A264801 12514511465855205467497303154688000,2467490887755897725667792936979169280000,698323914872709997998407130752506728284160000 %N A264801 Number of essentially different seating arrangements for 2n couples around a circular table with 4n seats such that no spouses are neighbors, the neighbors of each person have opposite gender and no person's neighbors belong to the same couple. %C A264801 This might be called the "maximum diversity" menage problem. Arrangements that differ only by rotation or reflection are excluded by the following conditions: Seat number 1 is assigned to person A. Seat number 2 can only be taken by a person of the same gender as A. The second condition forces an mmffmmff... pattern. %F A264801 a(n) = (2*n-1)! * A000183(2*n). %e A264801 a(1)=0 because with 2 couples it is impossible to satisfy all three conditions. %e A264801 a(2)=6 because only the following arrangements are possible with 4 couples: ABdaCDbc, ABcaDCbd, ACdaBDcb, ACbaDBcd, ADcaBCdb, ADbaCBdc. This corresponds to the (2*2-1)! possibilities for persons B, C and D to choose a seat. After the positions of A, B, C and D are fixed, only A000183(2*2)=1 possibility remains to arrange their spouses a, b, c and d. %o A264801 (PARI) a000183(N)={my(a0=[0,0,0,1,2,20],a=vector(N), %o A264801 f(x)=fibonacci(x-1)+fibonacci(x+1)+2;); %o A264801 if(N<7,a=a0[1..N],for(k=1,6,a[k]=a0[k]); %o A264801 for(n=7,N,a[n] = (-1)^n*(4*n+f(n)) + %o A264801 (n/(n-1))*((n+1)*a[n-1] + 2*(-1)^n*f(n-1)) %o A264801 - ((2*n)/(n-2))*((n-3)*a[n-2] + (-1)^n*f(n-2)) %o A264801 + (n/(n-3))*((n-5)*a[n-3] + 2*(-1)^(n-1)*f(n-3)) %o A264801 + (n/(n-4))*(a[n-4] + (-1)^(n-1)*f(n-4))));a}; %o A264801 a264901(limit)={my(a183=a000183(2*limit)); for(n=1,limit,print1((2*n-1)!*a183[2*n],", "))}; %o A264801 a264901(12) \\ _Hugo Pfoertner_, Sep 05 2020 %Y A264801 Cf. A000183, A007060, A094047, A114939, A258338. %K A264801 nonn %O A264801 1,2 %A A264801 _Hugo Pfoertner_, Nov 25 2015