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
A186769 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k nonincreasing even cycles (0<=k<=floor(n/4)). 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, 5, 95, 25, 451, 269, 3157, 1883, 21092, 18353, 875, 189828, 165177, 7875, 1660351, 1764749, 203700, 18263861, 19412239, 2240700, 197541565, 237001478, 43736682, 721875, 2568040345, 3081019214, 568576866, 9384375, 33029787974, 43065489284, 10638945317, 444068625
Offset: 0
Comments
Examples
T(4,1)=5 because we have (1243), (1324), (1342), (1423), and (1432). Triangle starts: 1; 1; 2; 6; 19,5; 95,25; 451,269;
Links
- Alois P. Heinz, Rows n = 0..200, flattened
Programs
-
Maple
g := exp((1-t)*(cosh(z)-1))*(1+z)^((1-t)*1/2)/(1-z)^((1+t)*1/2): gser := simplify(series(g, z = 0, 18)): for n from 0 to 14 do P[n] := sort(expand(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 # second Maple program: b:= proc(n) option remember; expand( `if`(n=0, 1, add(b(n-j)*binomial(n-1, j-1)* `if`(j::odd, (j-1)!, 1+x*((j-1)!-1)), j=1..n))) end: T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)): seq(T(n), n=0..14); # Alois P. Heinz, Apr 13 2017
-
Mathematica
b[n_] := b[n] = Expand[If[n == 0, 1, Sum[b[n-j]*Binomial[n - 1, j - 1]*If[ OddQ[j], (j - 1)!, 1 + x*((j - 1)! - 1)], {j, 1, n}]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ b[n]]; Table[T[n], {n, 0, 14}] // Flatten (* Jean-François Alcover, May 03 2017, after Alois P. Heinz *)
Formula
E.g.f.: G(t,z)=exp((1-t)(cosh z - 1))*(1+z)^{(1-t)/2}/(1-z)^{(1+t)/2}.
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}.
We have: G(t,z) = H(1,1,1,t,z).
A186768 Number of nonincreasing odd cycles in all permutations of {1,2,...,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)
0, 0, 0, 1, 4, 43, 258, 2525, 20200, 222119, 2221190, 28061889, 336742668, 4856656283, 67993187962, 1107076110629, 17713217770064, 322047491979087, 5796854855623566, 116542615962575753, 2330852319251515060, 51380800712458456259
Offset: 0
Keywords
Comments
a(n) = Sum(k*A186766(n,k), k>=0).
Examples
a(3)=1 because in (1)(2)(3), (1)(23), (12)(3), (13)(2), (123), and (132) we have a total of 0+0+0+0+0+1 =1 increasing odd cycles.
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..200
Programs
-
Maple
g := ((ln((1+z)/(1-z))-2*sinh(z))*1/2)/(1-z): gser := series(g, z = 0, 27): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 21);
-
Mathematica
CoefficientList[Series[(Log[(1+x)/(1-x)]-2*Sinh[x])/(2*(1-x)), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 07 2013 *)
Formula
E.g.f.: g(z)=[log((1+z)/(1-z))-2sinh(z)]/(2(1-z)).
a(n) ~ n!/2 * (log(2*n) + gamma - exp(1) + exp(-1)), where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Oct 07 2013
Extensions
Typo in e.g.f. corrected by Vaclav Kotesovec, Oct 07 2013
Comments
Examples
Links
Crossrefs
Programs
Maple
Mathematica
Formula