A000185
Coefficients of ménage hit polynomials.
Original entry on oeis.org
2, 24, 140, 1232, 11268, 115056, 1284360, 15596208, 204710454, 2888897032, 43625578836, 702025263328, 11993721979336, 216822550325472, 4135337882588880, 82986434235959712, 1747976804189353962, 38559791049947726328, 889047923669760546140
Offset: 5
- 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).
A170904
Sequence obtained by a formal reading of Riordan's Eq. (30a), p. 206.
Original entry on oeis.org
1, 0, 0, 2, 24, 572, 21280, 1074390, 70299264, 5792903144, 587159944704, 71822748886440, 10435273503677440, 1776780701352504408, 350461958856515690496, 79284041282799128098778, 20392765404792755583221760, 5917934230798152486136427600, 1924427226324694427836833857536
Offset: 0
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, pp. 206, 209.
-
# A000166
unprotect(D);
D := proc(n) option remember; if n<=1 then 1-n else (n-1)*(D(n-1)+D(n-2)); fi; end;
[seq(D(n),n=0..30)];
# A335700 (equals A000179 except that A335700(1) = 0)
U := proc(n) if n<=1 then 1-n else add ((-1)^k*(2*n)*binomial(2*n-k, k)*(n-k)!/(2*n-k), k=0..n); fi; end;
[seq(U(n),n=0..30)];
# bad A000186 (A170904)
Kbad:=proc(n) local k; global D, U; add( binomial(n,k)*D(n-k)*D(k)*U(n-2*k), k=0..floor(n/2) ); end;
[seq(Kbad(n),n=0..30)];
A174561
Number of 3 X n Latin rectangles whose second row contains two cycles with the same order of its elements, e.g., the cycle (x_2, x_3, ..., x_k, x_1) with x_1 < x_2 < ... < x_k.
Original entry on oeis.org
12, 120, 2020, 32410, 563948
Offset: 4
A186638
a(0)=a(1)=a(2)=0; thereafter a(n) = n*a(n-1) + n*a(n-2)/(n-2) + (-1)^(n-1)*4/(n-2).
Original entry on oeis.org
0, 0, 0, 4, 14, 78, 488, 3526, 28858, 264256, 2678632, 29787932, 360669542, 4723907966, 66555492656, 1003783052878, 16136592266226, 275459689319104, 4976428074043376, 94860000118416084, 1902729366895036542, 40062161968084543054, 883460565601444487384, 20363470614798268185558, 489687069917632739530538, 12264310955130816605856448
Offset: 0
- T. Muir, A Treatise on the Theory of Determinants. Dover, NY, 1960, Sect. 132, p. 112.
A000179 satisfies essentially the same recurrence.
-
W:=proc(n) option remember; if n <= 2 then 0 else
n*W(n-1)+n*W(n-2)/(n-2)+(-1)^(n-1)*4/(n-2); fi; end;
-
Flatten[{0,0,RecurrenceTable[{a[2]==0,a[3]==4,a[n]==n*a[n-1]+n*a[n-2]/(n-2)+(-1)^(n-1)*4/(n-2)},a,{n,2,20}]}] (* Vaclav Kotesovec, May 05 2015 *)
-
a[0]:0$ a[1]:0$ a[2]:0$ a[n]:=n*a[n-1]+n*a[n-2]/(n-2)+4*(-1)^(n-1)/(n-2)$ makelist(a[n], n, 0, 25); /* Bruno Berselli, May 23 2011 */
A275921
Number of 5 X n Latin rectangles.
Original entry on oeis.org
56, 9408, 11270400, 27206658048, 112681643083776, 746988383076286464, 7533492323047902093312, 111048869433803210653040640, 2315236533572491933131807916032, 66415035616070432053233927044726784, 2560483881619577552584872021599994249216
Offset: 5
A332709
Triangle T(n,k) read by rows where T(n,k) is the number of ménage permutations that map 1 to k, with 3 <= k <= n.
Original entry on oeis.org
1, 1, 1, 4, 5, 4, 20, 20, 20, 20, 115, 116, 117, 116, 115, 787, 791, 791, 791, 791, 787, 6184, 6203, 6204, 6205, 6204, 6203, 6184, 54888, 55000, 55004, 55004, 55004, 55004, 55000, 54888, 542805, 543576, 543595, 543596, 543597, 543596, 543595, 543576, 542805
Offset: 3
Triangle begins:
n\k| 3 4 5 6 7 8 9 10
---+--------------------------------------------------------
3 | 1
4 | 1, 1
5 | 4, 5, 4
6 | 20, 20, 20, 20
7 | 115, 116, 117, 116, 115
8 | 787, 791, 791, 791, 791, 787
9 | 6184, 6203, 6204, 6205, 6204, 6203, 6184
10 | 54888, 55000, 55004, 55004, 55004, 55004, 55000, 54888
For n=5 and k=3, the T(5,3)=4 permutations on five letters that start with a 3 are 31524, 34512, 35124, and 35212.
-
T[n_, k_] :=
Sum[Sum[(-1)^i*(n - i - 1)!*Binomial[2*k - j - 4, j]*
Binomial[2*(n - k + 1) - i + j, i - j], {j, Max[k + i - n - 1, 0],
Min[i, k - 2]}], {i, 0, n - 1}]
(* Peter Kagey, Jan 22 2021 *)
A354152
a(n) is the number of permutations pi in S_n such that pi(i) - i != 1 (mod n) and pi(i) - i != -1 (mod n) for all i.
Original entry on oeis.org
1, 0, 1, 1, 4, 13, 82, 579, 4740, 43387, 439794, 4890741, 59216644, 775596313, 10927434466, 164806435783, 2649391469060, 45226435601207, 817056406224418, 15574618910994665, 312400218671253764, 6577618644576902053, 145051250421230224306, 3343382818203784146955
Offset: 0
For n = 5, the a(5) = 13 permutations are 12345, 12543, 14325, 14523, 15342, 32145, 34125, 34512, 35142, 42315, 42513, 45123, and 45312.
The first letter is never 2 or 5, the second letter is never 1 or 3, the third letter is never 2 or 4, the fourth letter is never 3 or 5 and the fifth letter is never 1 or 4.
A354409
Maximum value in the n-th row of A354408.
Original entry on oeis.org
0, 1, 4, 13, 82, 579, 4752, 43390, 440192, 4890741, 59245120, 775596313, 10930514688, 164806652728, 2649865335040, 45226435601207, 817154768973824, 15574618910994665, 312426715251262464, 6577619798222863696, 145060238642780180480, 3343382818203784146955
Offset: 2
A002484
Number of ménage permutations.
Original entry on oeis.org
1, 2, 5, 20, 87, 616, 4843, 44128, 444621, 4936274, 59661265, 780547332, 10987097799, 165587196328, 2660378564791, 45392026278108, 819716784789209, 15620011000052754, 313219935456572497, 6593238656843759572
Offset: 3
- C. Berge, Principles of Combinatorics, Academic Press, NY, 1971, p. 162.
- E. N. Gilbert, Knots and classes of menage permutations, Scripta Math., 22 (1956), 228-233 (1957).
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 195.
- 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).
-
with(numtheory): d := n->divisors(n): U := (m,t)->sum(2*m*binomial(2*m-k,k)*(m-k)!*(t-1)^k/(2*m-k),k=0..m): A := (n,i)->phi(n/dd[i])*(n/dd[i])^dd[i]*U(dd[i],1-dd[i]/n)/n: for n from 3 to 28 do dd := d(n): B := [seq(A(n,j),j=1..nops(dd))]: a[n] := sum(B[i],i=1..nops(B)) od: seq(a[n],n=3..28); # Emeric Deutsch, Mar 08 2004
-
u[m_, t_] := Sum[ 2m*Binomial[ 2m-k, k]*(m-k)!*((t-1)^k / (2m-k)), {k, 0, m}]; a[n_] := Sum[ EulerPhi[n/d] * (n/d)^d * (u[d, 1-d/n]/n), {d, Divisors[n]} ]; Table[ a[n], {n, 3, 22} ] (* Jean-François Alcover, Dec 07 2011, after Maple *)
A058089
Coefficients of ménage hit polynomials.
Original entry on oeis.org
2, 35, 280, 2856, 30300, 349734, 4351368, 58217640, 834296862, 12759002305, 207501063952, 3577028170736, 65167077604440, 1251273416561196, 25258559758736880, 534813397441926960, 11852765770416416538, 274422835213034666655
Offset: 6
- J. Riordan, An Introduction to Combinatorial Analysis, Wiley, 1958, p. 197.
Comments