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 A258664 #82 Jul 20 2020 16:19:48 %S A258664 0,0,1,1,4,20,115,787,6184,54888,542805,5916725,70463900,910167596, %T A258664 12672415015,189181881575,3014307220880,51054940726928, %U A258664 915987174021609,17352888926841897,346144782915314740,7251738265074465220,159193007549552845339,3654204694819144118651 %N A258664 A total of n married couples, including a mathematician M and his wife, are to be seated at the 2n chairs around a circular table, with no man seated next to his wife. After the ladies are seated at every other chair, M is the first man allowed to choose one of the remaining chairs. The sequence gives the number of ways of seating the other men, with no man seated next to his wife, if M chooses the chair that is 3 seats clockwise from his wife's chair. %C A258664 This is a variation of the classic ménage problem (cf. A000179). %C A258664 It is known [Riordan, ch. 8, ex. 7(b)] that, after the ladies are seated at every other chair, the number U_n of ways of seating the men in the ménage problem has asymptotic expansion U_n ~ e^(-2)*n!*(1 + Sum_{k>=1}(-1)^k/(k!(n-1)_k)), where (n)_k = n*(n-1)*...*(n-k+1). %C A258664 Therefore, it is natural to conjecture that a(n) ~ e^(-2)*n!/(n-2)*(1 + Sum_{k>=1}(-1)^k/(k!(n-1)_k)). %D A258664 I. Kaplansky and J. Riordan, The problème des ménages, Scripta Math. 12, (1946), 113-124. %D A258664 J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, chs. 7, 8. %H A258664 Peter J. C. Moses, <a href="/A258664/a258664.pdf">Seatings for 6 couples</a> %H A258664 I. Kaplansky and J. Riordan, <a href="/A000166/a000166_1.pdf">The problème des ménages</a>, Scripta Math. 12, (1946), 113-124. [Scan of annotated copy] %H A258664 E. Lucas, <a href="https://archive.org/details/thoriedesnombre00lucagoog/page/n495">Sur le problème des ménages</a>, Théorie des nombres, Paris, 1891, 491-496. %H A258664 Vladimir Shevelev, Peter J. C. Moses, <a href="http://arxiv.org/abs/1101.5321">The ménage problem with a known mathematician</a>, arXiv:1101.5321 [math.CO], 2011, 2015. %H A258664 Vladimir Shevelev and Peter J. C. Moses, <a href="http://www.emis.de/journals/INTEGERS/papers/q72/q72.Abstract.html">Alice and Bob go to dinner: A variation on menage</a>, INTEGERS, Vol. 16 (2016), #A72. %H A258664 J. Touchard, <a href="http://gallica.bnf.fr/ark:/12148/bpt6k31506/f631.image">Sur un problème de permutations</a>, C.R. Acad. Sci. Paris, 198 (1934), 631-633. %F A258664 a(n) = Sum_{0<=k<=n-1}(-1)^k*(n-k-1)! * Sum_{max(k-n+2, 0)<=j<=min(k,1)} binomial(2-j, j)*binomial(2*n-k+j-4, k-j). %t A258664 a[d_,n_]:=If[n<=#-1,0,Sum[((-1)^k)*(n-k-1)!Sum[Binomial[2#-j-4,j]*Binomial[2(n-#)-k+j+2,k-j],{j,Max[#+k-n-1,0],Min[k,#-2]}],{k,0,n-1}]]&[(d+3)/2]; %t A258664 Map[a[3,#]&,Range[25]] (* _Peter J. C. Moses_, Jun 07 2015 *) %o A258664 (PARI) a(n) = sum(k=0, n-1, (-1)^k*(n-k-1)!*sum(j=max(k-n+2, 0), min(k,1), binomial(2-j, j)*binomial(2*n-k+j-4, k-j))); \\ _Michel Marcus_, Jun 26 2015 %Y A258664 Cf. A000179, A258665, A258666, A258667, A258673, A259212. %K A258664 nonn %O A258664 1,5 %A A258664 _Vladimir Shevelev_ and _Peter J. C. Moses_, Jun 07 2015