Original entry on oeis.org
0, 1, 2, 14, 82, 593, 4820, 43980, 444612, 4934721, 59661254, 780531034, 10987095718, 165586966817, 2660378564776, 45392022568024, 819716784789192, 15620010933562689, 313219935456042954, 6593238655510464742, 145364470356686267258, 3349976056859294611697
Offset: 0
- I. Kaplansky and J. Riordan, The problème des ménages, Scripta Math. 12, (1946), 113-124. See q_n.
A000179
Ménage numbers: a(0) = 1, a(1) = -1, and for n >= 2, a(n) = number of permutations s of [0, ..., n-1] such that s(i) != i and s(i) != i+1 (mod n) for all i.
Original entry on oeis.org
1, -1, 0, 1, 2, 13, 80, 579, 4738, 43387, 439792, 4890741, 59216642, 775596313, 10927434464, 164806435783, 2649391469058, 45226435601207, 817056406224416, 15574618910994665, 312400218671253762, 6577618644576902053, 145051250421230224304, 3343382818203784146955, 80399425364623070680706, 2013619745874493923699123
Offset: 0
a(2) = 0; nothing works. a(3) = 1; (201) works. a(4) = 2; (2301), (3012) work. a(5) = 13; (20413), (23401), (24013), (24103), (30412), (30421), (34012), (34021), (34102), (40123), (43012), (43021), (43102) work.
- W. W. R. Ball and H. S. M. Coxeter, Mathematical Recreations and Essays, 13th Ed. Dover, p. 50.
- M. Cerasoli, F. Eugeni and M. Protasi, Elementi di Matematica Discreta, Nicola Zanichelli Editore, Bologna 1988, Chapter 3, p. 78.
- L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 185, mu(n).
- Kaplansky, Irving and Riordan, John, The probleme des menages, Scripta Math. 12, (1946). 113-124. See u_n.
- E. Lucas, Théorie des nombres, Paris, 1891, pp. 491-495.
- P. A. MacMahon, Combinatory Analysis. Cambridge Univ. Press, London and New York, Vol. 1, 1915 and Vol. 2, 1916; see vol. 1, p 256.
- T. Muir, A Treatise on the Theory of Determinants. Dover, NY, 1960, Sect. 132, p. 112. - N. J. A. Sloane, Feb 24 2011
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 197.
- V. S. Shevelev, Reduced Latin rectangles and square matrices with equal row and column sums, Diskr. Mat. (J. of the Akademy of Sciences of Russia) 4(1992), 91-110. - Vladimir Shevelev, Mar 22 2010
- 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.
- J. Touchard, Permutations discordant with two given permutations, Scripta Math., 19 (1953), 108-119.
- J. H. van Lint, Combinatorial Theory Seminar, Eindhoven University of Technology, Springer Lecture Notes in Mathematics, Vol. 382, 1974. See page 10.
- Seiichi Manyama, Table of n, a(n) for n = 0..450 (terms 0..100 from T. D. Noe)
- M. A. Alekseyev, Weighted de Bruijn Graphs for the Menage Problem and Its Generalizations. Lecture Notes in Computer Science 9843 (2016), 151-162. doi:10.1007/978-3-319-44543-4_12 arXiv:1510.07926, [math.CO], 2015-2016.
- Vladimir Baltic, On the number of certain types of strongly restricted permutations, Applicable Analysis and Discrete Mathematics Vol. 4, No 1 (April, 2010), 119-135.
- Kenneth P. Bogart and Peter G. Doyle, Nonsexist solution of the ménage problem, Amer. Math. Monthly 93 (1986), no. 7, 514-519.
- A. Cayley, On a problem of arrangements, Proceedings of the Royal Society of Edinburgh 9 (1878) 338-342.
- A. Cayley, On a problem of arrangements, Proceedings of the Royal Society of Edinburgh 9 (1878) 338-342.
- A. Cayley, On Mr Muir's discussion of Professor Tait's problem of arrangements, Proceedings of the Royal Society of Edinburgh 9 (1878) 388-391.
- A. Cayley, On Mr Muir's discussion of Professor Tait's problem of arrangements, Proceedings of the Royal Society of Edinburgh 9 (1878) 388-391.
- J. Dutka, On the Probleme des Menages, Mathem. Conversat. (2001) 277-287, reprinted from Math. Intell. 8 (1986) 18-25
- A. de Gennaro, How many latin rectangles are there?, arXiv:0711.0527 [math.CO] (2007), see p. 2.
- P. Flajolet and R. Sedgewick, Analytic Combinatorics, 2009; see page 372
- Nick Hobson, Python program for this sequence.
- Peter Kagey, Ranking and Unranking Restricted Permutations, arXiv:2210.17021 [math.CO], 2022.
- Irving Kaplansky, Solution of the "Problème des ménages", Bull. Amer. Math. Soc. 49, (1943). 784-785.
- Irving Kaplansky, Symbolic solution of certain problems in permutations, Bull. Amer. Math. Soc., 50 (1944), 906-914.
- I. Kaplansky and J. Riordan, The problème des ménages, Scripta Math. 12, (1946), 113-124. [Scan of annotated copy]
- S. M. Kerawala, Asymptotic solution of the "Probleme des menages, Bull. Calcutta Math. Soc., 39 (1947), 82-84. [Annotated scanned copy]
- Vaclav Kotesovec, Non-attacking chess pieces, 6ed, 2013, p. 221.
- D. E. Knuth, Comments on A000179, Nov 25 2018 - Nov 27 2018.
- D. E. Knuth, Donald Knuth's 24th Annual Christmas Lecture: Dancing Links, Stanfordonline, Video published on YouTube, Dec 12, 2018.
- A. R. Kräuter, Über die Permanente gewisser zirkulärer Matrizen..., Séminaire Lotharingien de Combinatoire, B11b (1984), 11 pp.
- Yiting Li, Ménage Numbers and Ménage Permutations, J. Int. Seq. 18 (2015) 15.6.8
- E. Lucas, Théorie des Nombres, Gauthier-Villars, Paris, 1891, Vol. 1, p. 495.
- T. Muir, On Professor Tait's problem of arrangement, Proceedings of the Royal Society of Edinburgh 9 (1878) 382-387.
- T. Muir, On Professor Tait's problem of arrangement, Proceedings of the Royal Society of Edinburgh 9 (1878) 382-387.
- Vladimir Shevelev and Peter J. C. Moses, The ménage problem with a known mathematician, arXiv:1101.5321 [math.CO], 2011, 2015.
- Vladimir Shevelev and Peter J. C. Moses, Alice and Bob go to dinner: A variation on menage, INTEGERS, Vol. 16 (2016), #A72.
- R. J. Stones, S. Lin, X. Liu and G. Wang, On Computing the Number of Latin Rectangles, Graphs and Combinatorics (2016) 32:1187-1202; DOI 10.1007/s00373-015-1643-1.
- H. M. Taylor, A problem on arrangements, Mess. Math., 32 (1902), 60ff. [Annotated scanned copy]
- J. Touchard, Théorie des substitutions. Sur un problème de permutations, C. R. Acad. Sci. Paris 198 (1934), 631-633.
- Eric Weisstein's World of Mathematics, Married Couples Problem.
- Eric Weisstein's World of Mathematics, Rooks Problem.
- Wikipedia, Menage problem.
- M. Wyman and L. Moser, On the problème des ménages, Canad. J. Math., 10 (1958), 468-480.
- D. Zeilberger, Automatic Enumeration of Generalized Menage Numbers, arXiv preprint arXiv:1401.1089 [math.CO], 2014.
Cf.
A000904,
A059375,
A102761,
A000186,
A094047,
A067998,
A033999,
A258664,
A258665,
A258666,
A258667,
A258673,
A259212,
A213234,
A000023.
-
import Data.List (zipWith5)
a000179 n = a000179_list !! n
a000179_list = 1 : -1 : 0 : 1 : zipWith5
(\v w x y z -> (x * y + (v + 2) * z - w) `div` v) [2..] (cycle [4,-4])
(drop 4 a067998_list) (drop 3 a000179_list) (drop 2 a000179_list)
-- Reinhard Zumkeller, Aug 26 2013
-
A000179:= n ->add ((-1)^k*(2*n)*binomial(2*n-k,k)*(n-k)!/(2*n-k), k=0..n); # for n >= 1
U:= proc(n) local k; add( (2*n/(2*n-k))*binomial(2*n-k,k)*(n-k)!*(x-1)^k, k=0..n); end; W := proc(r,s) coeff( U(r),x,s ); end; A000179 := n->W(n,0); # valid for n >= 1
-
a[n_] := 2*n*Sum[(-1)^k*Binomial[2*n - k, k]*(n - k)!/(2*n - k), {k, 0, n}]; a[0] = 1; Table[a[n], {n, 0, 21}] (* Jean-François Alcover, Dec 05 2012, from 2nd formula *)
-
\\ 3 programs adapted to a(1) = -1 by Hugo Pfoertner, Aug 31 2020
-
{a(n) = my(A); if( n, A = vector(n,i,i-2); for(k=4, n, A[k] = (k * (k - 2) * A[k-1] + k * A[k-2] - 4 * (-1)^k) / (k-2)); A[n], 1)};/* Michael Somos, Jan 22 2008 */
-
a(n)=if(n>1, round(2*n*exp(-2)*besselk(n, 2)), 1-2*n) \\ Charles R Greathouse IV, Nov 03 2014
-
{a(n) = my(A); if( n, A = vector(n,i,i-2); for(k=5, n, A[k] = k * A[k-1] + 2 * A[k-2] + (4-k) * A[k-3] - A[k-4]); A[n], 1)} /* Michael Somos, May 02 2018 */
-
from math import comb, factorial
def A000179(n): return 1 if n == 0 else sum((-2*n if k & 1 else 2*n)*comb(m:=2*n-k,k)*factorial(n-k)//m for k in range(n+1)) # Chai Wah Wu, May 27 2022
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
G.f. = 1 + x^3 + 3*x^4 + 16*x^5 + 96*x^6 + 675*x^7 + 5413*x^8 + ...
- 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.
- Seiichi Manyama, Table of n, a(n) for n = 0..450 (terms 0..100 from T. D. Noe)
- W. Ahrens, Mathematische Unterhaltungen und Spiele, Leipzig: B. G. Teubner, 1901.
- J. D. H. Dickson, Discussion of two double series arising from the number of terms in determinants of certain forms, Proc. London Math. Soc., 10 (1879), 120-122.
- J. D. H. Dickson, Discussion of two double series arising from the number of terms in determinants of certain forms, Proc. London Math. Soc., 10 (1879), 120-122. [Annotated scanned copy]
- Dmitry Efimov, Determinants of generalized binary band matrices, arXiv:1702.05655 [math.RA], 2017.
- V. Kotesovec, Non-attacking chess pieces, 6ed, 2013, p. 222.
- Y. Li, Ménage Numbers and Ménage Permutations, J. Int. Seq. 18 (2015) 15.6.8
- H. M. Taylor, A problem on arrangements, Mess. Math., 32 (1902), 60ff. [Annotated scanned copy]
- M. Wyman and L. Moser, On the problème des ménages, Canad. J. Math., 10 (1958), 468-480.
-
[ &+[(-1)^(n-k)*Binomial(n+k, 2*k)*Factorial(k): k in [0..n]]: n in [0..21]]; // Bruno Berselli, Apr 11 2011
-
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);
-
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 *)
-
a(n) = if(n, round( 2*exp(-2)*(besselk(n+1,2) + besselk(n,2)) ), 1) \\ Charles R Greathouse IV, May 11 2016
A000905
Hamilton numbers.
Original entry on oeis.org
2, 3, 5, 11, 47, 923, 409619, 83763206255, 3508125906290858798171, 6153473687096578758448522809275077520433167, 18932619208894981833333582059033329370801266249535902023330546944758507753065602135843
Offset: 1
a(1)=2 is the familiar fact than one can always remove the linear term of a quadratic equation.
a(2)=3 because one can put any cubic equation in the form x^3-a=0 by a Tschirnhaus transformation based on the solutions of a quadratic equation.
a(4)=11 because one can remove the 4 terms after the first term in a polynomial of degree 11 without having to solve a quintic.
- 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).
- Amiram Eldar, Table of n, a(n) for n = 1..14
- Tigran Ananyan and Melvin Hochster, Universal Lex Ideal Approximations of Extended Hilbert Functions and Hamilton Numbers, arXiv:2003.00589 [math.AC], 2020.
- Alexander Chen, Y. H. He and J. McKay, Erland Samuel Bring's "Transformation of Algebraic Equations", arXiv preprint arXiv:1711.09253 [math.HO], 2017. See page 6.
- Raymond Garver, The Tschirnhaus transformation, The Annals of Mathematics, 2nd Ser., Vol. 29, No. 1/4. (1927 - 1928), pp. 329.
- William Rowan Hamilton, Inquiry Into the Validity of a Method Recently Proposed by George B. Jerrard, Esq. for Transforming and Resolving Equations of Elevated Degrees Undertaken at the Request of the Association. Richard and John E. Taylor, Report of the Sixth Meeting of the British Association for the Advancement of Science, held at Bristol in August 1836 (London: John Murray, Albemarle St., 1837), pp. 295-348.
- Edouard Lucas, Théorie des Nombres, Gauthier-Villars, Paris, 1891, Vol. 1, p. 496.
- Edouard Lucas, Théorie des Nombres, Gauthier-Villars, Paris, 1891, Vol. 1. [Annotated scan of pages 488-499 only]
- Alexander J. Sutherland, Upper Bounds on Resolvent Degree and Its Growth Rate, arXiv:2107.08139 [math.AG], 2021.
- James Joseph Sylvester and James Hammond, On Hamilton's numbers, Philosophical Transactions of the Royal Society of London A, Vol. 178 (1887), pp. 285-312, alternative link.
- Jesse Wolfson, Tschirnhaus transformations after Hilbert, arXiv:2001.06515 [math.AG], 2020.
-
A000905 := proc(n) option remember; local i; if n=1 then 2 else 2+add((-1)^(i+1)*binomial(A000905(n-i),i+1),i=1..n-1); fi; end;
-
a[1]=2; a[n_] := a[n] = 2+Sum[(-1)^(i+1)*Product[a[n-i] - k, {k, 0, i}]/(i+1)!, {i, 1, n-1}]; Table[a[n], {n, 1, 11}] (* Jean-François Alcover, May 17 2011, after Maple prog. *)
-
from sympy import binomial
a = [2]
[a.append(2+sum((-1)**(i)*binomial(a[n-i-1], i+2) for i in range(n))) for n in range(1,11)]
print(a) # Nicholas Stefan Georgescu, Mar 01 2023
The formula given by Lucas on p. 498 is slightly in error - see Maple program given here.
A127548
O.g.f.: Sum_{n>=0} n!*(x/(1+x)^2)^n.
Original entry on oeis.org
1, 1, 0, 1, 4, 19, 112, 771, 6088, 54213, 537392, 5867925, 69975308, 904788263, 12607819040, 188341689287, 3002539594128, 50878366664393, 913161208490016, 17304836525709097, 345279674107957524, 7235298537356113339
Offset: 0
-
A127548 := proc(n) if n = 0 then 1 ; else add(factorial(s)*(-1)^(n-s)*binomial(s+n-1,2*s-1),s=1..n) ; fi ; end: for n from 0 to 20 do printf("%d,",A127548(n)) ; od ; # R. J. Mathar, Jul 13 2007
-
nn = 21; CoefficientList[Series[Sum[n!*(x/(1 + x)^2)^n, {n, 0, nn}], {x, 0, nn}], x] (* Michael De Vlieger, Sep 04 2016 *)
-
import math
def binomial(n,m):
a=1
for k in range(n-m+1,n+1):
a *= k
return a//math.factorial(m)
def A127548(n):
if n == 0:
return 1
a=0
for s in range(1,n+1):
a += (-1)**(n-s)*binomial(s+n-1,2*s-1)*math.factorial(s)
return a
for n in range(30):
print(A127548(n))
# R. J. Mathar, Oct 20 2009
A273596
For n >= 2, a(n) is the number of slim rectangular diagrams of length n.
Original entry on oeis.org
1, 3, 9, 32, 139, 729, 4515, 32336, 263205, 2401183, 24275037, 269426592, 3257394143, 42615550453, 599875100487, 9040742057760, 145251748024649, 2478320458476795, 44755020000606961, 852823700470009056, 17101229029400788083, 359978633317886558801, 7936631162022905081707
Offset: 2
The initial term is the diagram of the four element diamond shape lattice.
- Vaclav Kotesovec, Table of n, a(n) for n = 2..400
- P. Bala, Notes on A273596
- Gábor Czédli, Tamás Dékány, Gergő Gyenizse, and Júlia Kulin, The number of slim rectangular lattices, Algebra Universalis, 2016, Volume 75, Issue 1, pp 33-50.
-
A273596 := proc (n) option remember; `if`(n = 2, 1, `if`(n = 3, 3, (n-2)*procname(n-1) + procname(n-2) + 2)) end: seq(A273596(n), n = 2..20); # Peter Bala, Jan 08 2017
-
x = 15;
SRectD = Table[0, {x}];
For[n = 2, n < x, n++,
For[a = 1, a < n, a++,
For[b = 1, b <= n - a, b++,
SRectD[[n]] +=
Binomial[n - a - 1, b - 1]*
Binomial[n - b - 1, a - 1]*(n - a - b)!;
]
]
Print[n, " ", SRectD[[n]]]
]
(* Alternatively: *)
T[n_, k_] := HypergeometricPFQ[{k+1, k-n}, {}, -1];
Table[Sum[T[n,k], {k,0,n}], {n,0,22}] (* Peter Luschny, Oct 05 2017 *)
-
a(n)= sum(rps=1, n, sum(r=1, n, s = rps-r; binomial(n-r-1, s-1) * binomial(n-s-1, r-1) * (n-r-s)!)); \\ Michel Marcus, Jun 12 2016
A335692
Inverse BINOMIAL transform of A335691.
Original entry on oeis.org
1, -1, 2, 0, 72, 1560, 59760, 2983680, 194382720, 15959099520, 1613411654400, 196978231296000, 28577836603008000, 4860382977536486400, 957836230033255372800, 216533832180149772288000, 55662541733368168574976000, 16145371763295690081374208000
Offset: 0
- I. Kaplansky and J. Riordan, The problème des ménages, Scripta Math. 12, (1946), 113-124. See p. 115, "n! b_{n+1}".
A001660
Hypotenusal numbers.
Original entry on oeis.org
1, 1, 2, 6, 36, 876, 408696, 83762796636, 3508125906207095591916, 6153473687096578758445014683368786661634996, 18932619208894981833333582059033329370801260096062214926751788496235698477988081702676
Offset: 0
- 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).
- J. J. Sylvester and M. J. Hammond, On Hamilton's numbers, Phil. Trans. Roy. Soc., 178 (1887), 285-312.
- E. Lucas, Théorie des Nombres, Gauthier-Villars, Paris, 1891, Vol. 1, p. 496.
- E. Lucas, Théorie des Nombres, Gauthier-Villars, Paris, 1891, Vol. 1. [Annotated scan of pages 488-499 only]
-
h[1] = 2; h[n_] := h[n] = 2+Sum[(-1)^(i+1)*Product[h[n-i]-k, {k, 0, i}]/(i+1)!, {i, 1, n-1}]; a[0] = 1; a[n_] := h[n+1] - h[n]; Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Dec 05 2013 *)
Showing 1-8 of 8 results.
Comments