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.

Showing 1-2 of 2 results.

A000271 Sums of ménage numbers.

Original entry on oeis.org

1, 0, 0, 1, 3, 16, 96, 675, 5413, 48800, 488592, 5379333, 64595975, 840192288, 11767626752, 176574062535, 2825965531593, 48052401132800, 865108807357216, 16439727718351881, 328839946389605643, 6906458590966507696
Offset: 0

Views

Author

Keywords

Comments

Permanent of the (0,1)-matrix having (i,j)-th entry equal to 0 iff this is on the diagonal or the first upper-diagonal. - Simone Severini, Oct 14 2004
Equivalently, number of permutations p of {1,2,...,n} such that p(i)-i not in {0,1}. - Andrew Howroyd, Sep 19 2017
From Vladimir Shevelev, Jun 21 2015: (Start)
Let 2*n!*V(n)=A137886(n) be the number of ways of seating n married couples at 2*n chairs arranged side-by-side in a straight line, men and women in alternate positions, so that no husband is next to his wife.
It is known [Riordan, Ch. 8, Th. 1, t=0] that, if 2*n!*U(n) is a solution of an analogous problem at a circular table, then U(n) = V(n) - V(n-1), n>=3, where U(n) = A000179(n). Thus V(n) = Sum_{i=3,...,n} A000179(i), n>=1, and comparing the initial conditions, we conclude that a(n) = V(n), n>=1. This gives a combinatorial interpretation for 2*n!*a(n).
(End)

Examples

			G.f. = 1 + x^3 + 3*x^4 + 16*x^5 + 96*x^6 + 675*x^7 + 5413*x^8 + ...
		

References

  • W. Ahrens, Mathematische Unterhaltungen und Spiele. Teubner, Leipzig, Vol. 1, 3rd ed., 1921; Vol. 2, 2nd ed., 1918. See Vol. 2, p. 79.
  • J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 198.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • H. M. Taylor, A problem on arrangements, Mess. Math., 32 (1902), 60ff.

Crossrefs

Cf. A000179, A000904, A001883, A137886, A292574. A diagonal of A058057.

Programs

  • Magma
    [ &+[(-1)^(n-k)*Binomial(n+k, 2*k)*Factorial(k): k in [0..n]]: n in [0..21]]; // Bruno Berselli, Apr 11 2011
    
  • Maple
    V := proc(n) local k; add( binomial(2*n-k,k)*(n-k)!*(x-1)^k, k=0..n); end; W := proc(r,s) coeff( V(r),x,s ); end; A000271 := n->W(n-2,0);
  • Mathematica
    Table[Sum[(-1)^(n - k) k! Binomial[n + k, 2 k], {k, 0, n}], {n, 0, 22}] (* Jean-François Alcover, Apr 11 2011, after Paul Barry *)
    RecurrenceTable[{a[0] == 1, a[1] == a[2] == 0, a[n] == (n - 1) a[n - 2] + (n - 1) a[n - 1] +  a[n - 3]}, a, {n, 30}] (* Harvey P. Dale, Jun 01 2012 *)
    Table[(-1)^n HypergeometricPFQ[{1, -n, n + 1}, {1/2}, 1/4], {n, 20}] (* Michael Somos, May 28 2014 *)
  • PARI
    a(n) = if(n, round( 2*exp(-2)*(besselk(n+1,2) + besselk(n,2)) ), 1) \\ Charles R Greathouse IV, May 11 2016

Formula

a(n) = (n - 1) a(n - 2) + (n - 1) a(n - 1) + a(n - 3).
From Paul Barry, Feb 08 2009: (Start)
G.f.: 1/(1+x-x/(1+x-x/(1+x-2x/(1+x-2x/(1+x-3x/(1+x-3x/(1+x-4x/(1+... (continued fraction);
a(n) = Sum_{k=0..n} binomial(2n-k,k)*(n-k)!*(-1)^k. (End)
a(n) = (-1)^n*hypergeom([1, -n, n+1],[1/2],1/4). - Mark van Hoeij, Nov 12 2009
a(n) = round( 2*exp(-2)*(BesselK(1+n,2) + BesselK(n,2)) ) for n>0. - Mark van Hoeij, Nov 12 2009
a(n) = Sum_{k=0..n} (-1)^(n-k)*binomial(n+k,2*k)*k!. - Paul Barry, Jun 23 2010
G.f.: Sum_{n>=0} n!*x^n/(1+x)^(2*n+1). - Ira M. Gessel, Jan 15 2013
a(n) ~ exp(-2)*n!. - Vaclav Kotesovec, Mar 10 2014
a(-1 - n) = -a(n) for all n in Z. - Michael Somos, May 28 2014
a(n) = Sum_{i=3..n} A000179(i), n>=1. - Vladimir Shevelev, Jun 21 2015
0 = a(n)*(-a(n+2) - a(n+3)) + a(n+1)*(+a(n+1) + 2*a(n+2) + a(n+3) - a(n+4)) + a(n+2)*(+a(n+2) + 2*a(n+3) - a(n+4)) + a(n+3)*(+a(n+3)) for all n in Z. - Michael Somos, Oct 16 2016

Extensions

More terms from James Sellers, Aug 21 2000
More terms from Simone Severini, Oct 14 2004

A234618 Numbers of undirected cycles in the n-crown graph.

Original entry on oeis.org

1, 28, 586, 16676, 674171, 36729512, 2591431284, 229610080632, 24945009633237, 3259554588092452, 504229440385599358, 91120169013941688700, 19019291896651737256463, 4540685283391286195445008, 1229402290052883559000280168, 374675876836087520170128786864
Offset: 3

Views

Author

Eric W. Weisstein, Dec 28 2013

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := Sum[Binomial[n, k]*((-1)^k*(k - 1)! + Sum[Sum[(-1)^i*i!*(k - i)!*(k - i - 1)!*Binomial[k, k - j]*Binomial[n - k, j]*Binomial[k - j, i]*Binomial[2*k - i - 1, i]/2, {i, 0, k - 1}], {j, 0, k}]), {k, 2, n}];
    Table[a[n], {n, 3, 18}] (* Jean-François Alcover, Oct 02 2017, after Andrew Howroyd *)
    RecurrenceTable[{(n - 3) (180 n^5 - 3462 n^4 + 25685 n^3 - 91106 n^2 + 152414 n - 93847) a[n] == (360 n^8 - 8904 n^7 + 93172 n^6 - 538135 n^5 + 1875502 n^4 - 4041070 n^3 + 5268157 n^2 - 3817934 n + 1189124) a[n - 1] - (n - 1) (180 n^9 - 5262 n^8 + 67445 n^7 - 497202 n^6 + 2321291 n^5 - 7107149 n^4 + 14233985 n^3 - 17904305 n^2 + 12741400 n - 3858611) a[n - 2] - (n - 2) (n - 1) (180 n^9 - 5442 n^8 + 71807 n^7 - 543239 n^6 + 2598146 n^5 - 8144697 n^4 + 16705322 n^3 - 21515171 n^2 + 15619923 n - 4754598) a[n - 3] + 2 (n - 3) (n - 2) (n - 1) (540 n^7 - 12585 n^6 + 122039 n^5 - 636205 n^4 + 1920840 n^3 - 3360924 n^2 + 3186108 n - 1302080) a[n - 4] + 2 (n - 4) (n - 3) (n - 2) (n - 1) (540 n^7 - 13806 n^6 + 145494 n^5 - 814365 n^4 + 2591726 n^3 - 4628556 n^2 + 4207415 n - 1449736) a[n - 5] - (n - 5) (n - 4) (n - 3) (n - 2) (n - 1) (1440 n^6 - 28956 n^5 + 230284 n^4 - 915485 n^3 + 1878786 n^2 - 1811640 n + 577483) a[n - 6] + 3 (n - 6) (n - 5) (n - 4) (n - 3) (n - 2) (n - 1) (180 n^5 - 2562 n^4 + 13637 n^3 - 33023 n^2 + 34309 n - 10136) a[n - 7], a[3] == 1, a[4] == 28, a[5] == 586, a[6] == 16676, a[7] == 674171, a[8] == 36729512, a[9] == 2591431284}, a, {n, 3, 20}] (* Eric W. Weisstein, Oct 02 2017 *)

Formula

a(n) = Sum_{k=2..n} binomial(n,k) * ( (-1)^k*(k-1)! + Sum_{j=0..k} Sum_{i=0..k-1} (-1)^i*i!*(k-i)!*(k-i-1)!*binomial(k,k-j)*binomial(n-k,j)*binomial(k-j,i)*binomial(2*k-i-1,i)/2 ). - Andrew Howroyd, Feb 24 2016
Recurrence: (n-3)*(180*n^5 - 3462*n^4 + 25685*n^3 - 91106*n^2 + 152414*n - 93847)*a(n) = (360*n^8 - 8904*n^7 + 93172*n^6 - 538135*n^5 + 1875502*n^4 - 4041070*n^3 + 5268157*n^2 - 3817934*n + 1189124)*a(n-1) - (n-1)*(180*n^9 - 5262*n^8 + 67445*n^7 - 497202*n^6 + 2321291*n^5 - 7107149*n^4 + 14233985*n^3 - 17904305*n^2 + 12741400*n - 3858611)*a(n-2) - (n-2)*(n-1)*(180*n^9 - 5442*n^8 + 71807*n^7 - 543239*n^6 + 2598146*n^5 - 8144697*n^4 + 16705322*n^3 - 21515171*n^2 + 15619923*n - 4754598)*a(n-3) + 2*(n-3)*(n-2)*(n-1)*(540*n^7 - 12585*n^6 + 122039*n^5 - 636205*n^4 + 1920840*n^3 - 3360924*n^2 + 3186108*n - 1302080)*a(n-4) + 2*(n-4)*(n-3)*(n-2)*(n-1)*(540*n^7 - 13806*n^6 + 145494*n^5 - 814365*n^4 + 2591726*n^3 - 4628556*n^2 + 4207415*n - 1449736)*a(n-5) - (n-5)*(n-4)*(n-3)*(n-2)*(n-1)*(1440*n^6 - 28956*n^5 + 230284*n^4 - 915485*n^3 + 1878786*n^2 - 1811640*n + 577483)*a(n-6) + 3*(n-6)*(n-5)*(n-4)*(n-3)*(n-2)*(n-1)*(180*n^5 - 2562*n^4 + 13637*n^3 - 33023*n^2 + 34309*n - 10136)*a(n-7). - Vaclav Kotesovec, Feb 25 2016
a(n) ~ Pi * BesselI(0,2) * n^(2*n) / exp(2*n+2). - Vaclav Kotesovec, Feb 25 2016

Extensions

a(13) from Eric W. Weisstein, Jan 08 2014
a(14) from Eric W. Weisstein, Apr 09 2014
a(15)-a(16) from Andrew Howroyd, Feb 24 2016
Showing 1-2 of 2 results.