A000181
Coefficients of ménage hit polynomials.
Original entry on oeis.org
2, 15, 60, 469, 3660, 32958, 328920, 3614490, 43341822, 563144725, 7880897892, 118177520295, 1890389939000, 32130521850972, 578260307815920, 10985555094348948, 219687969344126490, 4613039009310624795, 101479234383619208204, 2333872309936442446905
Offset: 4
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 197.
- 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).
A000426
Coefficients of ménage hit polynomials.
Original entry on oeis.org
0, 1, 1, 1, 8, 35, 211, 1459, 11584, 103605, 1030805, 11291237, 135015896, 1749915271, 24435107047, 365696282855, 5839492221440, 99096354764009, 1780930394412009, 33789956266629001, 674939337282352360, 14157377139256183723, 311135096550816014651
Offset: 1
- 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.
-
[0] cat [&+[(-1)^k*Factorial(2*n-k-1)*Factorial(n-k) / (Factorial(2*n-2*k)*Factorial(k-2)): k in [2..n]]: n in [2..25]]; // Vincenzo Librandi, Jun 11 2019
-
Table[Sum[(-1)^k*(2*n-k-1)!*(n-k)!/((2*n-2*k)!*(k-2)!),{k,2,n}],{n,1,20}] (* Vaclav Kotesovec, Oct 26 2012 *)
A003435
Number of directed Hamiltonian circuits on n-octahedron with a marked starting node.
Original entry on oeis.org
8, 192, 11904, 1125120, 153262080, 28507207680, 6951513784320, 2153151603671040, 826060810479206400, 384600188992919961600, 213656089636192754073600, 139620366072628402087526400, 106033731334825319789808844800
Offset: 2
n=2: label vertices of a square 1,2,3,4. Then the 8 Hamiltonian circuits are 1234, 1432, 2341, 2143, 3412, 3214, 4123, 4321; so a(2) = 8.
- N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
- Vincenzo Librandi, Table of n, a(n) for n = 2..100
- Kenneth P. Bogart and Peter G. Doyle, Nonsexist solution of the menage problem, Amer. Math. Monthly 93 (1986), no. 7, 514-519.
- D. Singmaster, Enumerating unlabeled Hamiltonian circuts, Preprint (1974).
- D. Singmaster, Hamiltonian circuits on the n-dimensional octahedron, J. Combinatorial Theory Ser. B 19 (1975), no. 1, 1-4.
- D. Singmaster, Letter to N. J. A. Sloane, May 1975
- Eric Weisstein's World of Mathematics, Cocktail Party Graph
-
[(&+[ (-1)^k*2^(k+1)*n*Binomial(n, k)*Factorial(2*n-k-1): k in [0..n]]) : n in [2..20]]; // G. C. Greubel, Nov 17 2022
-
A003435 := n->add((-1)^k*binomial(n,k)*((2*n)/(2*n-k))*2^k*(2*n-k)!,k=0..n);
-
a[n_] := 2^n*n!*(2n-1)!!*Hypergeometric1F1[-n, 1-2n, -2]; Table[ a[n], {n, 2, 14}] (* Jean-François Alcover, Nov 04 2011 *)
-
a(n)=sum(k=0,n,(-1)^k*binomial(n,k)*((2*n)/(2*n-k))*2^k*(2*n-k)!) \\ Charles R Greathouse IV, Nov 04 2011
-
[sum( (-1)^k*2^(k+1)*n*binomial(n, k)*factorial(2*n-k-1) for k in (0..n)) for n in (2..20)] # G. C. Greubel, Nov 17 2022
A094314
Triangle read by rows: T(n,k) = number of ways of seating n couples around a circular table so that exactly k married couples are adjacent (0 <= k <= n).
Original entry on oeis.org
1, 0, 1, 0, 0, 2, 1, 0, 3, 2, 2, 8, 4, 8, 2, 13, 30, 40, 20, 15, 2, 80, 192, 210, 152, 60, 24, 2, 579, 1344, 1477, 994, 469, 140, 35, 2, 4738, 10800, 11672, 7888, 3660, 1232, 280, 48, 2, 43387, 97434, 104256, 70152, 32958, 11268, 2856, 504, 63, 2, 439792, 976000, 1036050, 695760, 328920, 115056, 30300, 6000, 840, 80, 2
Offset: 0
Triangle begins:
1;
0, 1;
0, 0, 2;
1, 0, 3, 2;
2, 8, 4, 8, 2;
13, 30, 40, 20, 15, 2;
80, 192, 210, 152, 60, 24, 2;
579, 1344, 1477, 994, 469, 140, 35, 2;
4738, 10800, 11672, 7888, 3660, 1232, 280, 48, 2;
...
- I. Kaplansky and J. Riordan, The problème des ménages, Scripta Math. 12, (1946), 113-124. See Table 1.
- Tolman, L. Kirk, "Extensions of derangements", Proceedings of the West Coast Conference on Combinatorics, Graph Theory and Computing, Humboldt State University, Arcata, California, September 5-7, 1979. Vol. 26. Utilitas Mathematica Pub., 1980. See Table I.
- Alois P. Heinz, Rows n = 0..140, flattened
- I. Kaplansky and J. Riordan, The problème des ménages, Scripta Math. 12, (1946), 113-124. [Scan of annotated copy]
- Anthony C. Robin, 90.72 Circular Wife Swapping, The Mathematical Gazette, Vol. 90, No. 519 (Nov., 2006), pp. 471-478.
- L. Takacs, On the probleme des menages, Discr. Math. 36 (3) (1981) 289-297, Table 1.
Essentially a mirror image of
A058087, which has much more information.
-
T[n_, k_]:= If[n<2, (1+(-1)^(n-k))/2, Sum[(-1)^j*(2*n*(n-k-j)!/(2*n-k-j))* Binomial[k+j, k]*Binomial[2*n-k-j, k+j], {j, 0, n-k}]];
Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, May 15 2021 *)
-
def A094314(n,k): return (1+(-1)^(n+k))/2 if (n<2) else sum( (-1)^j*(2*n*factorial(n-k-j)/(2*n-k-j))*binomial(k+j, k)*binomial(2*n-k-j, k+j) for j in (0..n-k) )
flatten([[A094314(n,k) for k in (0..n)] for n in (0..12)]) # G. C. Greubel, May 15 2021
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
A321352
Triangle T(n,k) giving the number of permutations pi of {1,2,...,n} such that for all i, pi(i) is not in {i, i+1, ..., i+k-1} (mod n), with 0 <= k <= n - 1.
Original entry on oeis.org
1, 2, 1, 6, 2, 1, 24, 9, 2, 1, 120, 44, 13, 2, 1, 720, 265, 80, 20, 2, 1, 5040, 1854, 579, 144, 31, 2, 1, 40320, 14833, 4738, 1265, 264, 49, 2, 1, 362880, 133496, 43387, 12072, 2783, 484, 78, 2, 1, 3628800, 1334961, 439792, 126565, 30818, 6208, 888, 125, 2, 1
Offset: 1
Table begins:
1
2, 1
6, 2, 1
24, 9, 2, 1
120, 44, 13, 2, 1
720, 265, 80, 20, 2, 1
5040, 1854, 579, 144, 31, 2, 1
40320, 14833, 4738, 1265, 264, 49, 2, 1
362880, 133496, 43387, 12072, 2783, 484, 78, 2, 1
A324621
Number of permutations p of [1+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(1+n)*[i
Original entry on oeis.org
0, 1, 1, 7, 31, 185, 1275, 10095, 90109, 895169, 9793829, 116998199, 1515196619, 21143666585, 316260079951, 5047672782687, 85623656678457, 1538245254809537, 29176112648650441, 582614412521648359, 12217688610474042487, 268445509189890555577
Offset: 0
-
a:= proc(n) option remember; `if`(n<5, [0, 1$2, 7, 31][n+1],
((2*n^4-3*n^3-2*n^2+n+4)*a(n-1) -(n^5-4*n^4+7*n^2+6*n-14)*
a(n-2) -(n^5-2*n^4-4*n^3+2*n^2+13*n-12)*a(n-3)-(n-2)*
(n^3+2*n^2+n-2)*a(n-4))/(n^3-n^2-2))
end:
seq(a(n), n=0..23);
-
menage[n_] := If[n == 0, 1, 2n Sum[(-1)^k Binomial[2n-k, k] (n-k)!/(2n-k), {k, 0, n}]];
a[n_] := If[n == 0, 0, Subfactorial[n+1] - menage[n+1]];
a /@ Range[0, 21] (* Jean-François Alcover, Oct 28 2021 *)
A324622
Number of permutations p of [2+n] such that n is the maximum of the number of elements in any integer interval [p(i)..i+(2+n)*[i
Original entry on oeis.org
0, 1, 1, 11, 60, 435, 3473, 31315, 313227, 3445641, 41341502, 537313583, 7520316423, 112771887719, 1803821926465, 30656189582521, 551659191788556, 10478765887885181, 209522984620760153, 4398943767896801309, 96755196700729056267, 2224901906327124750355
Offset: 0
A341439
Table of generalized ménage numbers read by antidiagonals upward: T(n,k) is the number of permutations pi in S_k such that pi(i) != i, i+n (mod k) for all i; n, k >= 1.
Original entry on oeis.org
0, 0, 0, 0, 1, 1, 0, 0, 1, 2, 0, 1, 2, 4, 13, 0, 0, 1, 2, 13, 80, 0, 1, 1, 9, 13, 82, 579, 0, 0, 2, 2, 13, 80, 579, 4738, 0, 1, 1, 4, 44, 82, 579, 4740, 43387, 0, 0, 1, 2, 13, 80, 579, 4738, 43387, 439792, 0, 1, 2, 9, 13, 265, 579, 4752, 43390, 439794, 4890741
Offset: 1
Table begins:
n\k | 1 2 3 4 5 6 7 8
----+--------------------------
1 | 0 0 1 2 13 80 579 4738
2 | 0 1 1 4 13 82 579 4740
3 | 0 0 2 2 13 80 579 4738
4 | 0 1 1 9 13 82 579 4752
5 | 0 0 1 2 44 80 579 4738
6 | 0 1 2 4 13 265 579 4740
7 | 0 0 1 2 13 80 1854 4738
8 | 0 1 1 9 13 82 579 14833
Comments