cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-5 of 5 results.

A186763 Number of increasing odd cycles in all permutations of {1,2,...,n}.

Original entry on oeis.org

0, 1, 2, 7, 28, 141, 846, 5923, 47384, 426457, 4264570, 46910271, 562923252, 7318002277, 102452031878, 1536780478171, 24588487650736, 418004290062513, 7524077221125234, 142957467201379447, 2859149344027588940, 60042136224579367741
Offset: 0

Views

Author

Emeric Deutsch, Feb 27 2011

Keywords

Comments

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)
A cycle is said to be odd if it has an odd number of entries.

Examples

			a(3)=7 because in (1)(2)(3), (1)(23), (12)(3), (13)(2), (123), and (132) we have a total of 3+1+1+1+1+0=7 increasing odd cycles.
		

Programs

  • Maple
    g := sinh(z)/(1-z): gser := series(g, z = 0, 27): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 21);
    # Alternatively:
    A186763 := n -> (exp(1)*GAMMA(1+n,1) - exp(-1)*GAMMA(1+n,-1))/2:
    seq(simplify(A186763(n)), n=0..21); # Peter Luschny, Dec 18 2017
  • Mathematica
    a=0;Table[a=n*a+(1/2)(1-(-1)^n),{n,0,30}] (* Vladimir Joseph Stephan Orlovsky, Apr 02 2011 *)
    CoefficientList[Series[Sinh[x]/(1-x), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 05 2013 *)

Formula

a(n) = Sum_{k>=0} k*A186761(n,k).
E.g.f.: (sinh z)/(1-z).
a(n) ~ n! * (exp(2)-1)*exp(-1)/2. - Vaclav Kotesovec, Oct 05 2013
a(n) = (exp(1)*Gamma(1+n,1) - exp(-1)*Gamma(1+n,-1))/2 = (A000522(n) - A000166(n))/2. - Peter Luschny, Dec 18 2017
a(n) = n! * Sum_{k=0..floor((n-1)/2)} 1 / (2*k+1)!. - Ilya Gutkovskiy, Jul 16 2021
D-finite with recurrence a(n) -n*a(n-1) -a(n-2) +(n-2)*a(n-3)=0. - R. J. Mathar, Jul 26 2022

A186764 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k increasing even 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)

Original entry on oeis.org

1, 1, 1, 1, 3, 3, 14, 7, 3, 70, 35, 15, 419, 226, 60, 15, 2933, 1582, 420, 105, 23421, 12741, 3423, 630, 105, 210789, 114669, 30807, 5670, 945, 2108144, 1144921, 311160, 55755, 7875, 945, 23189584, 12594131, 3422760, 613305, 86625, 10395, 278279165, 151125052, 41041968, 7429290, 1001385, 114345, 10395
Offset: 0

Author

Emeric Deutsch, Feb 27 2011

Keywords

Comments

Row n contains 1+floor(n/2) entries.
Sum of entries in row n is n!.
T(n,0) = A186765(n).
Sum(k*T(n,k), k>=0) = A080227(n).

Examples

			T(3,1)=3 because we have (1)(23), (12)(3), and (13)(2).
T(4,2)=3 because we have (12)(34), (13)(24), and (14)(23).
Triangle starts:
   1;
   1;
   1,  1;
   3,  3;
  14,  7,  3;
  70, 35, 15;
  ...
		

Crossrefs

Programs

  • Maple
    g := exp((t-1)*(cosh(z)-1))/(1-z): gser := simplify(series(g, z = 0, 15)): for n from 0 to 12 do P[n] := sort(expand(factorial(n)*coeff(gser, z, n))) end do: for n from 0 to 12 do seq(coeff(P[n], t, k), k = 0 .. floor((1/2)*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)!, 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)!, 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((t-1)(cosh z - 1))/(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}.
We have: G(t,z) = H(1,t,1,1,z).

A186762 Number of permutations of {1,2,...,n} having no increasing 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)

Original entry on oeis.org

1, 0, 1, 1, 9, 33, 235, 1517, 12593, 111465, 1122819, 12313409, 147949593, 1922353925, 26918452691, 403744456541, 6460109224801, 109820584161393, 1976779056442179, 37558742545087481, 751175283283221129, 15774677696321630525, 347042934659313999539, 7981987292809647817237
Offset: 0

Author

Emeric Deutsch, Feb 27 2011

Keywords

Comments

a(n) = A186761(n,0).

Examples

			a(3)=1 because we have (132).
a(4)=9 because we have (12)(34), (13)(24), (14)(23), and the six cyclic permutations of {1,2,3,4}.
		

Programs

  • Maple
    g := exp(-sinh(z))/(1-z): gser := series(g, z = 0, 27): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 23);
    # second Maple program:
    a:= proc(n) option remember; `if`(n=0, 1, add(a(n-j)*
         ((j-1)!-irem(j, 2))*binomial(n-1, j-1), j=1..n))
        end:
    seq(a(n), n=0..23);  # Alois P. Heinz, May 04 2023
  • Mathematica
    CoefficientList[Series[E^(-Sinh[x])/(1-x), {x, 0, 20}], x] * Range[0, 20]! (* Vaclav Kotesovec, Mar 16 2014 *)

Formula

E.g.f.: g(z) = exp(-sinh z)/(1-z).
a(n) ~ exp(-sinh(1)) * n! = 0.308756853522... * n!. - Vaclav Kotesovec, Mar 16 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)

Original entry on oeis.org

1, 1, 2, 5, 20, 77, 472, 2585, 21968, 157113, 1724064, 15229645, 204738624, 2151199429, 34194201472, 416221515169, 7631627843840, 105565890206193, 2192501224174080, 33962775502534165, 787900686999286784, 13509825183288167869
Offset: 0

Author

Emeric Deutsch, Feb 27 2011

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).
		

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)

Original entry on oeis.org

1, 1, 2, 6, 19, 95, 451, 3157, 21092, 189828, 1660351, 18263861, 197541565, 2568040345, 33029787974, 495446819610, 7377279473779, 125413751054243, 2120559951767503, 40290639083582557, 762353357154540584, 16009420500245352264
Offset: 0

Author

Emeric Deutsch, Feb 27 2011

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.
		

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)).
Showing 1-5 of 5 results.