login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A002816 Number of polygons that can be formed from n points on a circle, no two adjacent.
(Formerly M3102 N1257)
10

%I M3102 N1257 #57 Feb 09 2023 15:03:48

%S 1,0,0,0,1,3,23,177,1553,14963,157931,1814453,22566237,302267423,

%T 4340478951,66541218865,1084982173641,18752743351339,342523093859011,

%U 6593167693927885,133408305489947029,2831112931136162775,62878579846490149375,1458746608689369440265

%N Number of polygons that can be formed from n points on a circle, no two adjacent.

%C Also number of ways of arranging the numbers 1..n in a circle so that adjacent numbers do not differ by 1 mod n. Reversing the direction around the circle does not count as a different solution (cf. A078603).

%C Also number of ways of seating n people around a circular table so that no one sits next to any of his neighbors in a previous seating order.

%C Suppose n people are seated at random around a circular table for two meals. Then p(n) = a(n)/((n-1)!/2) is the probability that no two people sit together at both meals.

%C Number of Hamiltonian cycles in the complement of C_n where C_n is the n-cycle graph. - _Andrew Howroyd_, Mar 15 2016

%D P. Poulet, Reply to Query 4750, Permutations, L'Intermédiaire des Mathématiciens, 26 (1919), 117-121.

%D N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H T. D. Noe, <a href="/A002816/b002816.txt">Table of n, a(n) for n = 1..100</a>

%H B. Aspvall and F. M. Liang, <a href="http://infolab.stanford.edu/TR/CS-TR-80-829.html">The dinner table problem</a>, Technical Report CS-TR-80-829, Computer Science Department, Stanford, California, 1980.

%H D. P. Robbins, <a href="http://www.jstor.org/stable/2321990">The probability that neighbors remain neighbors after random rearrangements</a>, Amer. Math. Monthly 87 (1980), 122-124.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/CycleComplementGraph.html">Cycle Complement Graph</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HamiltonianCycle.html">Hamiltonian Cycle</a>

%H <a href="/index/La#lacings">Index entries for sequences related to shoe lacings</a>

%F D-finite with recurrence (n^2 - 7n + 9)a(n) = (n^3 - 8n^2 + 18n - 21)a(n - 1) + 4n(n - 5)a(n - 2) - 2(n - 6)(n^2 - 5n + 3)a(n - 3) + (n^2 - 7n + 9)a(n - 4) + (n - 5)(n^2 - 5n + 3)a(n - 5), for n >= 8. - Poulet.

%F p(n) = exp(-2)*(1 + O(1/n)). - Aspvall and Liang.

%F Asymptotic: a(n)/(n-1)! ~ 1/(2*e^2)*(1 - 4/n + 20/(3n^3) + 58/(3n^4) + 796/(15n^5) + 7858/(45n^6) + 40324/(63n^7) + 140194/(63n^8) + 2444744/(405n^9) + 40680494/(14175n^10) + ...). - _Vaclav Kotesovec_, Apr 10 2012

%e a(6)=3: 135264, 136425, 142635.

%p dinner := proc(n) local j,k,sum; sum := (n-1)!/2 + (-1)^n; for k from 1 to n-1 do for j from 1 to min(n-k,k) do sum := sum+(-1)^k*binomial(k-1,j-1)*binomial(n-k,j)*n/(n-k)*(n-k-1)!/2*2^j; od; od; end;

%t t = {1, 0, 0, 0, 1, 3, 23}; Do[AppendTo[t, ((n^3 - 8*n^2 + 18*n - 21) t[[-1]] + 4*n*(n - 5) t[[-2]] - 2*(n - 6) (n^2 - 5 n + 3) t[[-3]] + (n^2 - 7*n + 9) t[[-4]] + (n - 5) (n^2 - 5*n + 3) t[[-5]])/(n^2 - 7*n + 9)], {n, 8, 25}]; t (* _T. D. Noe_, Jan 04 2012 *)

%t Join[{1, 0}, RecurrenceTable[{a[3] == 0, a[4] == 0, a[5] == 1, a[6] == 3, a[7] == 23, (n^2 - 7 n + 9) a[n] == (n^3 - 8 n^2 + 18 n - 21) a[n - 1] + 4 n (n - 5) a[n - 2] - 2 (n - 6) (n^2 - 5 n + 3) a[n - 3] + (n^2 - 7 n + 9) a[n - 4] + (n - 5) (n^2 - 5 n + 3) a[n - 5]}, a, {n, 3, 20}]] (* _Eric W. Weisstein_, Feb 26 2021 *)

%Y Cf. A000179 (Ménage problem), A078603, A078630, A078631, A242522 (Hamiltonian cycles in complement of path), A006184, left column of A326411.

%K nonn,nice,easy

%O 1,6

%A _N. J. A. Sloane_

%E Entry improved by Michael Steyer (m.steyer(AT)osram.de), Aug 30 2001

%E More terms from _Sascha Kurz_, Mar 22 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)