A187245
Number of permutations of [n] having no cycle with 2 alternating runs (it is assumed that the smallest element of the cycle is in the first position).
Original entry on oeis.org
1, 1, 2, 5, 17, 78, 463, 3315, 27164, 247975, 2492539, 27422698, 328607417, 4266367567, 59686293284, 895068242601, 14320843215019, 243467476610732, 4382635181281015, 83272415871044649, 1665465961530365026, 34974843092354081119, 769445564105823722109
Offset: 0
a(3)=5 because we have among the 6 permutations of {1,2,3} only 312=(132) has a cycle with 2 alternating runs.
-
g := exp((4*exp(z)-exp(2*z)-3-2*z)*1/4)/(1-z): gser := series(g, z = 0, 25): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 22);
# second Maple program:
a:= proc(n) option remember;
`if`(n=0, 1, add(a(n-j)*binomial(n-1, j-1)*
`if`(j=1, 1, (j-1)!-(2^(j-2)-1)), j=1..n))
end:
seq(a(n), n=0..30); # Alois P. Heinz, Apr 15 2017
-
CoefficientList[Series[E^((4*E^x-E^(2*x)-3-2*x)/4)/(1-x), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Mar 15 2014 *)
A187246
Number of cycles with 2 alternating runs in all permutations of [n] (it is assumed that the smallest element of the cycle is in the first position).
Original entry on oeis.org
0, 0, 0, 1, 7, 42, 267, 1900, 15263, 137494, 1375195, 15127656, 181532895, 2359929682, 33039019643, 495585302836, 7929364861759, 134799202682670, 2426385648353595, 46101327318849376, 922026546377249663, 19362557473922767210, 425976264426301927195
Offset: 0
a(4)=7 because each of the following permutations of {1,2,3,4} has 1 cycle with 2 alternating runs: (132)(4), (142)(3), (143)(2), (1)(243), (1243), (1342), and (1432); the remaining 17 permutations have none.
-
g := (1/4*(3+2*z+exp(2*z)-4*exp(z)))/(1-z): gser := series(g, z = 0, 25): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 22);
# second Maple program:
b:= proc(n) option remember; expand(
`if`(n=0, 1, add(b(n-j)*binomial(n-1, j-1)*
`if`(j=1, 1, (j-1)!+(2^(j-2)-1)*(x-1)), j=1..n)))
end:
a:= n-> (p-> add(coeff(p, x, i)*i, i=0..degree(p)))(b(n)):
seq(a(n), n=0..30); # Alois P. Heinz, Apr 15 2017
-
CoefficientList[Series[(3+2*x+E^(2*x)-4*E^(x))/(4*(1-x)), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Mar 15 2014 *)
A187250
Triangle read by rows: T(n,k) is the number of permutations of [n] having k cycles with at least 3 alternating runs (it is assumed that the smallest element of a cycle is in the first position), 0<=k<=floor(n/4).
Original entry on oeis.org
1, 1, 2, 6, 22, 2, 94, 26, 460, 260, 2532, 2508, 15420, 24760, 140, 102620, 254968, 5292, 739512, 2760432, 128856, 5729192, 31547344, 2640264, 47429896, 381339368, 50186136, 46200, 417429800, 4879612808, 926494712, 3483480, 3888426512, 66107044176, 17025751600, 157068912
Offset: 0
T(4,1)=2 because we have (1324) and (1423).
Triangle starts:
1;
1;
2;
6;
22,2;
94,26;
460,260;
-
G := exp((1/4*(1-t))*(2*z-1+exp(2*z)))/(1-z)^t: Gser := simplify(series(G, z = 0, 17)): for n from 0 to 14 do P[n] := sort(factorial(n)*coeff(Gser, z, n)) end do: for n from 0 to 14 do seq(coeff(P[n], t, k), k = 0 .. floor((1/4)*n)) end do; # yields sequence in triangular form
Showing 1-3 of 3 results.
Comments