A186763 Number of increasing odd cycles in all permutations of {1,2,...,n}.
0, 1, 2, 7, 28, 141, 846, 5923, 47384, 426457, 4264570, 46910271, 562923252, 7318002277, 102452031878, 1536780478171, 24588487650736, 418004290062513, 7524077221125234, 142957467201379447, 2859149344027588940, 60042136224579367741
Offset: 0
Keywords
A186761 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k increasing odd cycles (0<=k<=n). A cycle (b(1), b(2), ...) is said to be increasing if, when written with its smallest element in the first position, it satisfies b(1)
1, 0, 1, 1, 0, 1, 1, 4, 0, 1, 9, 4, 10, 0, 1, 33, 56, 10, 20, 0, 1, 235, 218, 211, 20, 35, 0, 1, 1517, 1982, 833, 616, 35, 56, 0, 1, 12593, 14040, 9612, 2408, 1526, 56, 84, 0, 1, 111465, 134248, 72588, 35176, 5838, 3360, 84, 120, 0, 1, 1122819, 1305126, 797461, 276120, 107710, 12516, 6762, 120, 165, 0, 1
Offset: 0
Examples
T(3,1)=4 because we have (1)(23), (12)(3), (13)(2), and (123). T(4,1)=4 because we have (1)(243), (143)(2), (142)(3), and (132)(4). Triangle starts: 1; 0, 1; 1, 0, 1; 1, 4, 0, 1; 9, 4, 10, 0, 1; 33, 56, 10, 20, 0, 1; ...
Links
- Alois P. Heinz, Rows n = 0..170, flattened
Programs
-
Maple
g := exp((t-1)*sinh(z))/(1-z): gser := simplify(series(g, z = 0, 13)): for n from 0 to 10 do P[n] := sort(expand(factorial(n)*coeff(gser, z, n))) end do: for n from 0 to 10 do seq(coeff(P[n], t, k), k = 0 .. n) end do; # yields sequence in triangular form # second Maple program: b:= proc(n) option remember; expand(`if`(n=0, 1, add(b(n-j)*( `if`(j::odd, x-1, 0)+(j-1)!)*binomial(n-1, j-1), j=1..n))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n)): seq(T(n), n=0..14); # Alois P. Heinz, May 12 2017
-
Mathematica
b[n_] := b[n] = Expand[If[n == 0, 1, Sum[b[n - j]*(If[OddQ[j], x - 1, 0] + (j - 1)!)*Binomial[n - 1, j - 1], {j, 1, n}]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, n}]][b[n]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jun 05 2018, after Alois P. Heinz *)
Formula
E.g.f.: G(t,z) = exp((t-1)*sinh z)/(1-z).
The 5-variate e.g.f. H(x,y,u,v,z) of permutations with respect to size (marked by z), number of increasing odd cycles (marked by x), number of increasing even cycles (marked by y), number of nonincreasing odd cycles (marked by u), and number of nonincreasing even cycles (marked by v), is given by
H(x,y,u,v,z)=exp(((x-u)sinh z + (y-v)(cosh z - 1))*(1+z)^{(u-v)/2}/(1-z)^{(u+v)/2}.
A186765 Number of permutations of {1,2,...,n} having no increasing even cycles. A cycle (b(1), b(2), ...) is said to be increasing if, when written with its smallest element in the first position, it satisfies b(1)
1, 1, 1, 3, 14, 70, 419, 2933, 23421, 210789, 2108144, 23189584, 278279165, 3617629145, 50646737049, 759701055735, 12155215581362, 206638664883154, 3719496008830391, 70670424167777429, 1413408484443295197, 29681578173309199137, 652994719769134284068
Offset: 0
Keywords
Examples
a(3)=3 because we have (1)(2)(3), (132), and (123).
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
Programs
-
Maple
g := exp(1-cosh(z))/(1-z); gser := series(g, z = 0, 27): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 21); # second Maple program: a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)* binomial(n-1, j-1)*((j-1)!+irem(j, 2)-1), j=1..n)) end: seq(a(n), n=0..22); # Alois P. Heinz, Feb 05 2025
-
Mathematica
CoefficientList[Series[E^(1-Cosh[x])/(1-x), {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Feb 24 2014 *)
-
Maxima
a(n):=((sum(sum(((-1)^k*sum(((sum((j-2*i)^m*binomial(j,i),i,0,j))*(-1)^(j-k)*binomial(k,j))/2^j,j,0,k))/k!,k,1,m)/m!,m,1,n))+1)*n!; /* Vladimir Kruchinin, Apr 25 2011 */
-
PARI
my(x='x+O('x^66)); Vec(serlaplace(exp(1-cosh(x))/(1-x))) /* Joerg Arndt, Apr 26 2011 */
Formula
a(n) = A186764(n,0).
E.g.f.: exp(1-cosh(z))/(1-z).
a(n) = ((sum(m=1..n,sum(k=1..m,((-1)^k*sum(j=0..k,((sum(i=0..j,(j-2*i)^m*binomial(j, i)))*(-1)^(j-k)*binomial(k, j))/2^j))/k!)/m!))+1)*n!. [Vladimir Kruchinin, Apr 25 2011]
a(n) ~ n! * exp(1-cosh(1)). - Vaclav Kotesovec, Feb 24 2014
A186767 Number of permutations of {1,2,...,n} having no nonincreasing odd cycles. A cycle (b(1), b(2), ...) is said to be increasing if, when written with its smallest element in the first position, it satisfies b(1)
1, 1, 2, 5, 20, 77, 472, 2585, 21968, 157113, 1724064, 15229645, 204738624, 2151199429, 34194201472, 416221515169, 7631627843840, 105565890206193, 2192501224174080, 33962775502534165, 787900686999286784, 13509825183288167869
Offset: 0
Keywords
Comments
a(n) = A186766(n,0).
Examples
a(3)=5 because we have (1)(2)(3), (1)(23), (12)(3), (13)(2), and (123).
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..450
Programs
-
Maple
g := exp(sinh(z))/sqrt(1-z^2): gser := series(g, z = 0, 27): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 21); # second Maple program: a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)* binomial(n-1, j-1)*`if`(j::even, (j-1)!, 1), j=1..n)) end: seq(a(n), n=0..25); # Alois P. Heinz, Apr 13 2017
-
Mathematica
a[n_] := a[n] = If[n==0, 1, Sum[a[n-j]*Binomial[n-1, j-1]*If[EvenQ[j], (j-1)!, 1], {j, 1, n}]]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 18 2017, after Alois P. Heinz *)
Formula
E.g.f.: g(z) = exp(sinh z)/sqrt(1-z^2).
A186770 Number of permutations of {1,2,...,n} having no nonincreasing even cycles. A cycle (b(1), b(2), ...) is said to be increasing if, when written with its smallest element in the first position, it satisfies b(1)
1, 1, 2, 6, 19, 95, 451, 3157, 21092, 189828, 1660351, 18263861, 197541565, 2568040345, 33029787974, 495446819610, 7377279473779, 125413751054243, 2120559951767503, 40290639083582557, 762353357154540584, 16009420500245352264
Offset: 0
Keywords
Comments
a(n) = A186769(n,0).
Examples
a(4)=19 because among the 24 permutations of {1,2,3,4} only (1243), (1324), (1342), (1423), and (1432) have nonincreasing even cycles.
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..450
Programs
-
Maple
g := exp(cosh(z)-1)*sqrt((1+z)/(1-z)): gser := series(g, z = 0, 27): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 21); # second Maple program: a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)* binomial(n-1, j-1)*`if`(j::odd, (j-1)!, 1), j=1..n)) end: seq(a(n), n=0..25); # Alois P. Heinz, Apr 13 2017
-
Mathematica
a[n_] := a[n] = If[n==0, 1, Sum[a[n-j]*Binomial[n-1, j-1]*If[OddQ[j], (j-1)!, 1], {j, 1, n}]]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, May 18 2017, after Alois P. Heinz *)
Formula
E.g.f.: g(z) = exp(cosh z - 1)*sqrt((1+z)/(1-z)).
Comments
Examples
Links
Crossrefs
Programs
Maple
Mathematica
Formula