login
This site is supported by donations to The OEIS Foundation.

 

Logo

Annual appeal: Please make a donation to keep the OEIS running! Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
Other ways to donate

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A007060 Number of ways n couples can sit in a row without any spouses next to each other. 11
1, 0, 8, 240, 13824, 1263360, 168422400, 30865121280, 7445355724800, 2287168006717440, 871804170613555200, 403779880746418176000, 223346806774106790297600, 145427383048755178635264000 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

a(n) approaches (2n)!*exp(-1) as n goes to infinity.

Also the number of (directed) Hamiltonian paths of the n-cocktail party graph - Eric W. Weisstein, Dec 16 2013

LINKS

Andrew Woods, Table of n, a(n) for n = 0..100

G. Almkvist, Letter to N. J. A. Sloane, Apr. 1992

Eric Weisstein's World of Mathematics, Cocktail Party Graph

Eric Weisstein's World of Mathematics, Hamiltonian Path

FORMULA

a(n) = (Pi*BesselI(n+1/2,1)*(-1)^n+BesselK(n+1/2,1))*exp(-1)*(2/Pi)^(1/2)*2^n*n! - Mark van Hoeij, Nov 12 2009

a(n) = (-1)^n*2^n*n!*A000806(n), n>0. - Vladeta Jovovic, Nov 19 2009

a(n) = n!*hypergeom([ -n, n+1],[],1/2)*(-2)^n. - Mark van Hoeij, Nov 13 2009

a(n) = 2^n * A114938(n). - Toby Gottfried, Nov 22 2010

a(n) = 2*n((2*n-1)*a(n-1) + (2*n-2)*a(n-2)), n>1. - Aaron Meyerowitz, May 14 2014

From Peter Bala, Mar 06 2015: (Start)

a(n) = Sum_{k = 0..n} (-1)^(n-k)*binomial(n,k)*A000166(2*k).

For n >= 1, int_{x = 0..1} (x^2 - 1)^n*exp(x) dx = a(n)*e - A177840(n). Hence A177840(n)/a(n) -> e as n -> infinity (End)

a(n) ~ sqrt(Pi) * 2^(2*n+1) * n^(2*n + 1/2) / exp(2*n+1). - Vaclav Kotesovec, Mar 09 2016

EXAMPLE

For n = 2, the a(2) = 8 solutions for the couples {1,2} and {3,4} are {1324, 1423, 2314, 2413, 3142, 3241, 4132, 4231}.

MAPLE

seq(add((-1)^i*binomial(n, i)*2^i*(2*n-i)!, i=0..n), n=0..20);

MATHEMATICA

Table[Sum[(-1)^i Binomial[n, i] (2 n - i)! 2^i, {i, 0, n}], {n, 0, 20}]

Table[(2 n)! Hypergeometric1F1[-n, -2 n, -2], {n, 0, 20}]

PROG

(PARI) a(n)=sum(k=0, n, binomial(n, k)*(-1)^(n-k)*(n+k)!*2^(n-k)) \\ Charles R Greathouse IV, May 11 2016

(Python)

from sympy import binomial, subfactorial

def a(n): return sum([(-1)**(n - k)*binomial(n, k)*subfactorial(2*k) for k in xrange(n + 1)]) # Indranil Ghosh, Apr 28 2017

CROSSREFS

Cf. A000166, A000806, A114938, A177840, A053983, A053984.

Sequence in context: A221466 A067360 A221770 * A158263 A221417 A272236

Adjacent sequences:  A007057 A007058 A007059 * A007061 A007062 A007063

KEYWORD

nonn,easy,nice,changed

AUTHOR

David Roberts Keeney (David.Roberts.Keeney(AT)directory.Reed.edu)

EXTENSIONS

More terms from Michel ten Voorde (seqfan(AT)tenvoorde.org), Apr 11 2001

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy .

Last modified November 19 08:51 EST 2017. Contains 294923 sequences.