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-10 of 10 results.

A101053 a(n) = n! * Sum_{k=0..n} Bell(k)/k! (cf. A000110).

Original entry on oeis.org

1, 2, 6, 23, 107, 587, 3725, 26952, 219756, 1998951, 20105485, 221838905, 2666280457, 34689290378, 485840964614, 7288997427755, 116634438986227, 1982868327635663, 35692311974248093, 678159760252918824, 13563246929216611852, 284828660383365005643
Offset: 0

Views

Author

Karol A. Penson, Nov 29 2004

Keywords

Comments

Sequence was originally defined as an infinite sum involving generalized Laguerre polynomials: a(n) = ((-1)^n*n!/exp(1))*Sum_{k>=0} LaguerreL(n,-n-1,k)/k!, n=0,1... . It appears in the problem of normal ordering of functions of boson operators.
a(n) is the number of ways to linearly order the elements in a (possibly empty) subset S of {1,2,...,n} and then partition the complement of S. - Geoffrey Critzer, Aug 07 2015

Crossrefs

Programs

  • Magma
    m:=30; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( Exp(Exp(x)-1)/(1-x) )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Mar 31 2019
    
  • Maple
    with(combinat): a:=n->add(bell(j)*n!/j!,j=0..n): seq(a(n),n=0..20); # Zerinvary Lajos, Mar 19 2007
  • Mathematica
    nn = 21; Range[0, nn]! CoefficientList[Series[Exp[(Exp[x]-1)]/(1-x), {x, 0, nn}], x] (* Geoffrey Critzer, Aug 07 2015 *)
  • PARI
    egf(s)=my(v=Vec(s),i); while(polcoeff(s,i)==0,i++); i--; vector(i+#v,j,polcoeff(s,j+i)*(j+i)!)
    egf(exp(exp(x)-1)/(1-x)) \\ Charles R Greathouse IV, Aug 07 2015
    
  • PARI
    my(x='x+O('x^30)); Vec(serlaplace( exp(exp(x)-1)/(1-x) )) \\ G. C. Greubel, Mar 31 2019
    
  • PARI
    a_vector(n) = my(v=vector(n+1)); v[1]=1; for(i=1, n, v[i+1]=sum(j=1, i, ((j-1)!+1)*binomial(i-1, j-1)*v[i-j+1])); v; \\ Seiichi Manyama, Jul 14 2022
    
  • Sage
    m = 30; T = taylor(exp(exp(x)-1)/(1-x), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, Mar 31 2019

Formula

E.g.f: exp(exp(x)-1)/(1-x).
a(n) ~ exp(exp(1)-1) * n!. - Vaclav Kotesovec, Jun 26 2022
a(0) = 1; a(n) = Sum_{k=1..n} ((k-1)! + 1) * binomial(n-1,k-1) * a(n-k). - Seiichi Manyama, Jul 14 2022

Extensions

New definition from Vladeta Jovovic, Dec 01 2004

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

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 1, 1, 3, 1, 5, 5, 7, 6, 1, 23, 36, 25, 25, 10, 1, 129, 234, 166, 110, 65, 15, 1, 894, 1597, 1316, 686, 385, 140, 21, 1, 7202, 12459, 10893, 5754, 2611, 1106, 266, 28, 1, 65085, 111451, 97287, 54559, 22428, 8841, 2730, 462, 36, 1, 651263, 1116277, 963121, 554670, 229405, 80871, 26397, 6000, 750, 45, 1
Offset: 0

Views

Author

Emeric Deutsch, Feb 26 2011

Keywords

Examples

			T(3,0) = 1 because we have (132).
T(4,2) = 7 because we have (1)(234), (13)(24), (12)(34), (123)(4), (124)(3), (134)(2), and (14)(23).
Triangle starts:
   1;
   0,  1;
   0,  1,  1;
   1,  1,  3,  1;
   5,  5,  7,  6,  1;
  23, 36, 25, 25, 10, 1;
		

Crossrefs

Programs

  • Maple
    G := exp((t-1)*(exp(z)-1))/(1-z); Gser := simplify(series(G, z = 0, 16)): 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, j), j = 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-i)*binomial(n-1, i-1)*(x+(i-1)!-1), i=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Sep 25 2016
  • Mathematica
    b[n_] := b[n] = Expand[If[n==0, 1, Sum[b[n-i]*Binomial[n-1, i-1]*(x + (i-1)! - 1), {i, 1, n}]]]; T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Oct 04 2016, after Alois P. Heinz *)

Formula

E.g.f.: G(t,z) = exp((t-1)*(exp(z)-1))/(1-z).
The 4-variate e.g.f. H(u,v,w,z) of the permutations of {1,2,...,n} with respect to size (marked by z), number of fixed points (marked by u), number of increasing cycles of length >=2 (marked by v), and number of nonincreasing cycles (marked by w) is given by H(u,v,w,z) = exp(u*z+v*(exp(z)-1-z)+w*(1-exp(z)))/(1-z)^w. Remark: the nonincreasing cycles are necessarily of length >=3. We have: G(t,z) = H(t,t,1,z).
Sum_{k=0..n} T(n,k) = n!.
T(n,0) = A186755(n).
Sum_{k=0..n} k*T(n,k) = A002627(n).

A186758 Number of permutations of {1,2,...,n} with no increasing cycles of length >=2. 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, 2, 10, 59, 363, 2491, 19661, 176536, 1767540, 19460671, 233578585, 3036411429, 42507793209, 637606959466, 10201702712738, 173429224591607, 3121728583605435, 59312852905363623, 1186257030934984061, 24911396924131631880, 548050726738352726108
Offset: 0

Views

Author

Emeric Deutsch, Feb 26 2011

Keywords

Comments

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

Examples

			a(3)=2 because we have (1)(2)(3) and (132).
a(4)=10 because we have (1)(2)(34), (1)(243), (132)(4), (142)(3), (143)(2), and the 5 cyclic permutations of {1,2,3,4} different from (1234).
		

Crossrefs

Programs

  • Maple
    g := exp(1+z-exp(z))/(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)*((j-1)!-`if`(j=1, 0, 1)), j=1..n))
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Apr 13 2017
  • Mathematica
    CoefficientList[Series[E^(1+x-E^x)/(1-x), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 05 2013 *)

Formula

E.g.f.: exp(1+z-exp(z))/(1-z).
a(n) ~ n! * exp(2-exp(1)). - Vaclav Kotesovec, Oct 05 2013
a(n) = Sum_{k=0..1} A186754(n,k). - Alois P. Heinz, Dec 02 2021

A186756 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k nonincreasing cycles (0<=k<=floor(n/3)). 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) < b(2) < b(3) < ... .

Original entry on oeis.org

1, 1, 2, 5, 1, 15, 9, 52, 68, 203, 507, 10, 877, 3918, 245, 4140, 32057, 4123, 21147, 280700, 60753, 280, 115975, 2645611, 853914, 13300, 678570, 26917867, 11923428, 396935, 4213597, 295934526, 169127222, 9710855, 15400, 27644437, 3513447546, 2469452843, 215274774, 1201200
Offset: 0

Views

Author

Emeric Deutsch, Feb 26 2011

Keywords

Comments

Row n contains 1 + floor(n/3) entries.

Examples

			T(3,0) = 5 because we have (1)(2)(3), (1)(23), (12)(3), (13)(2), and (123).
T(3,1) = 1 because we have (132).
T(4,1) = 9 because we have (1)(243), (1432), (142)(3), (132)(4), (1342), (1423), (1243), (143)(2), and (1324).
Triangle starts:
    1;
    1;
    2;
    5,   1;
   15,   9;
   52,  68;
  203, 507, 10;
		

Crossrefs

Programs

  • Maple
    G := exp((1-t)*(exp(z)-1))/(1-z)^t: Gser := simplify(series(G, z = 0, 16)): for n from 0 to 13 do P[n] := sort(expand(factorial(n)*coeff(Gser, z, n))) end do: for n from 0 to 13 do seq(coeff(P[n], t, j), j = 0 .. floor((1/3)*n)) end do; # yields sequence in triangular form
    # second Maple program:
    b:= proc(n) option remember; expand(`if`(n=0, 1, add(
          (1+x*(i!-1))*b(n-i-1)*binomial(n-1, i), i=0..n-1)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
    seq(T(n), n=0..15);  # Alois P. Heinz, Sep 26 2016
  • Mathematica
    b[n_] := b[n] = Expand[If[n==0, 1, Sum[(1+x*(i!-1))*b[n-i-1]*Binomial[n-1, i], {i, 0, n-1}]]]; T[n_] := Function [p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n]]; Table[T[n], {n, 0, 15}] // Flatten (* Jean-François Alcover, Nov 28 2016 after Alois P. Heinz *)

Formula

E.g.f.: G(t,z) = exp((1-t)*(exp(z)-1))/(1-z)^t.
The 4-variate e.g.f. H(u,v,w,z) of the permutations of {1,2,...,n} with respect to size (marked by z), number of fixed points (marked by u), number of increasing cycles of length >=2 (marked by v), and number of nonincreasing cycles (marked by w) is given by H(u,v,w,z) = exp(u*z+v*(exp(z)-1-z)+w*(1-exp(z)))/(1-z)^w. Remark: the nonincreasing cycles are necessarily of length >=3. We have: G(t,z) = H(1,1,t,z).
Sum_{k=0..n} T(n,k) = n!.
T(n,0) = A000110(n) (the Bell numbers).
Sum_{k=0..n} k*T(n,k) = A121633(n).

A186757 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k increasing cycles of length >=2 (0<=k<= n/2). 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) < b(2) < b(3) < ... .

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 10, 11, 3, 59, 36, 25, 363, 212, 130, 15, 2491, 1688, 651, 210, 19661, 14317, 4487, 1750, 105, 176536, 129076, 42435, 12628, 2205, 1767540, 1277159, 451626, 104755, 26775, 945, 19460671, 13974236, 5068723, 1120570, 264880, 27720
Offset: 0

Views

Author

Emeric Deutsch, Feb 26 2011

Keywords

Comments

Row n contains 1 + floor(n/2) entries.
Sum of entries in row n is n!.
T(n,0) = A186758(n).
Sum_{k>=0} k*T(n,k) = A056542(n).

Examples

			T(3,0)=2 because we have (1)(2)(3) and (132).
T(4,2)=3 because we have (13)(24), (12)(34), and (14)(23).
Triangle starts:
    1;
    1;
    1,   1;
    2,   4;
   10,  11,   3;
   59,  36,  25;
  363, 212, 130, 15;
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; expand(
          `if`(n=0, 1, add(b(n-i)*binomial(n-1, i-1)*
          `if`(i>1, (x+(i-1)!-1), 1), i=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
    seq(T(n), n=0..12);  # Alois P. Heinz, Mar 19 2017
  • Mathematica
    b[n_] := b[n] = Expand[If[n == 0, 1, Sum[b[n-i]*Binomial[n-1, i-1]*If[i > 1, (x + (i - 1)! - 1), 1], {i, 1, n}]]];
    T[n_] := Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][ b[n]];
    Table[T[n], {n, 0, 12}] // Flatten (* Jean-François Alcover, May 03 2017, after Alois P. Heinz *)

Formula

E.g.f.: G(t,z) = exp((t-1)(exp(z)-1-z))/(1-z).
The 4-variate e.g.f. H(u,v,w,z) of the permutations of {1,2,...,n} with respect to size (marked by z), number of fixed points (marked by u), number of increasing cycles of length >=2 (marked by v), and number of nonincreasing cycles (marked by w) is given by H(u,v,w,z)=exp(uz+v(exp(z)-1-z)+w(1-exp(z))/(1-z)^w. Remark: the nonincreasing cycles are necessarily of length >=3. We have: G(t,z)=H(1,t,1,z).

A186759 Triangle read by rows: T(n,k) is the number of permutations of {1,2,...,n} having k cycles that are either nonincreasing or of length 1 (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) < b(2) < b(3) < ... .

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 1, 4, 0, 1, 4, 9, 10, 0, 1, 11, 53, 35, 20, 0, 1, 41, 280, 268, 95, 35, 0, 1, 162, 1804, 1904, 903, 210, 56, 0, 1, 715, 12971, 15727, 8008, 2408, 406, 84, 0, 1, 3425, 104600, 142533, 80323, 25662, 5502, 714, 120, 0, 1, 17722, 936370, 1418444, 871575, 303385, 68712, 11256, 1170, 165, 0, 1
Offset: 0

Views

Author

Emeric Deutsch, Feb 26 2011

Keywords

Examples

			T(3,1) = 4 because we have (1)(23), (12)(3), (13)(2), and (132).
T(4,4) = 1 because we have (1)(2)(3)(4).
Triangle starts:
   1;
   0,  1;
   1,  0,  1;
   1,  4,  0,  1;
   4,  9, 10,  0, 1;
  11, 53, 35, 20, 0, 1;
		

Crossrefs

Programs

  • Maple
    G := exp((1-t)*(exp(z)-1-z))/(1-z)^t: 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, j), j = 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-i)*binomial(n-1, i-1)*
          `if`(i=1, x, 1+x*((i-1)!-1)), i=1..n)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..degree(p)))(b(n)):
    seq(T(n), n=0..10);  # Alois P. Heinz, Sep 25 2016
  • Mathematica
    b[n_] := b[n] = Expand[If[n == 0, 1, Sum[b[n-i]*Binomial[n-1, i-1]*If[i == 1, x, 1+x*((i-1)!-1)], {i, 1, n}]]]; T[n_] := Function[p, Table[ Coefficient[p, x, i], {i, 0, Exponent[p, x]}]][b[n]]; Table[T[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Nov 28 2016 after Alois P. Heinz *)

Formula

E.g.f.: G(t,z) = exp((1-t)*(exp(z)-1-z))/(1-z)^t.
The 4-variate e.g.f. H(u,v,w,z) of the permutations of {1,2,...,n} with respect to size (marked by z), number of fixed points (marked by u), number of increasing cycles of length >=2 (marked by v), and number of nonincreasing cycles (marked by w) is given by H(u,v,w,z) = exp(u*z+v*(exp(z)-1-z)+w*(1-exp(z)))/(1-z)^w. Remark: the nonincreasing cycles are necessarily of length >=3. We have: G(t,z) = H(t,1,t,z).
Sum_{k=0..n} T(n,k) = n!.
T(n,0) = A000296(n).
Sum_{k=0..n} k*T(n,k) = A186760(n).

A186760 Number of cycles that are either nonincreasing or of length 1 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)

Original entry on oeis.org

0, 1, 2, 7, 33, 188, 1247, 9448, 80623, 765926, 8022139, 91872328, 1142384735, 15330003154, 220847064955, 3399884265524, 55705822616383, 967921774366510, 17778279366693179, 344189681672898400, 7005438733866799999, 149547115419379439978, 3341127481398057119515
Offset: 0

Views

Author

Emeric Deutsch, Feb 26 2011

Keywords

Comments

a(n) = Sum(A186759(n,k), k=0..n).

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 + 0 + 1 = 7 cycles that are either of length 1 or nonincreasing.
		

Crossrefs

Programs

  • Maple
    g := (1+z-exp(z)-ln(1-z))/(1-z): gser := series(g, z = 0, 25): seq(factorial(n)*coeff(gser, z, n), n = 0 .. 22);
  • Mathematica
    CoefficientList[Series[(1+x-E^x-Log[1-x])/(1-x), {x, 0, 20}], x]* Range[0, 20]! (* Vaclav Kotesovec, Oct 08 2013 *)

Formula

E.g.f.: (1+z-exp(z)-log(1-z))/(1-z).
a(n) ~ n! * (log(n) + gamma + 2 - exp(1)), where gamma is the Euler-Mascheroni constant (A001620). - Vaclav Kotesovec, Oct 08 2013
D-finite with recurrence a(n) +(-2*n-1)*a(n-1) +(n^2+2*n-4)*a(n-2) +(-2*n^2+6*n-3)*a(n-3) +((n-3)^2)*a(n-4)=0. - R. J. Mathar, Jul 26 2022

A349788 Number of permutations of [n] having exactly one increasing cycle.

Original entry on oeis.org

0, 1, 1, 1, 5, 36, 234, 1597, 12459, 111451, 1116277, 12298958, 147655760, 1919465237, 26870436345, 403044639709, 6448695657957, 109628096021612, 1973308547820586, 37492874766408001, 749857477972731979, 15747006284752049759, 346434131946498886045
Offset: 0

Views

Author

Alois P. Heinz, Nov 30 2021

Keywords

Comments

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) < b(2) < ... .
Exponential convolution of A000587 with A002627.

Examples

			a(4) = 5: (1)(243), (143)(2), (142)(3), (132)(4), (1234).
		

Crossrefs

Column k=1 of A186754.

Programs

  • Maple
    b:= proc(n) option remember; series(`if`(n=0, 1, add((x+
         (j-1)!-1)*binomial(n-1, j-1)*b(n-j), j=1..n)), x, 2)
        end:
    a:= n-> coeff(b(n), x, 1):
    seq(a(n), n=0..23);
  • Mathematica
    b[n_] := b[n] = Series[If[n == 0, 1, Sum[(x+
         (j-1)!-1)*Binomial[n-1, j-1]*b[n-j], {j, 1, n}]], {x, 0, 2}];
    a[n_] := Coefficient[b[n], x, 1];
    Table[a[n], {n, 0, 23}] (* Jean-François Alcover, Apr 15 2022, after Alois P. Heinz *)

Formula

E.g.f.: exp(1-exp(x))*(exp(x)-1)/(1-x).
a(n) = A186758(n) - A186755(n).
a(n) = Sum_{j=0..n} binomial(n,j)*A000587(j)*A002627(n-j).
a(n) mod 2 = A131719(n).
a(n) ~ (exp(1) - 1) * exp(1 - exp(1)) * n!. - Vaclav Kotesovec, Dec 05 2021

A355672 Expansion of e.g.f. exp(1/(1-x) - exp(x)).

Original entry on oeis.org

1, 0, 1, 5, 26, 169, 1329, 12088, 124221, 1422307, 17947550, 247318851, 3693469273, 59396067080, 1022975862713, 18781241965081, 366070181352802, 7547972562003093, 164113696105503057, 3752143293971556144, 89976991297720804061, 2257905394760969948079
Offset: 0

Views

Author

Seiichi Manyama, Jul 14 2022

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 20; CoefficientList[Series[E^(1/(1-x) - E^x), {x, 0, nmax}], x] * Range[0, nmax]! (* Vaclav Kotesovec, Jul 21 2022 *)
  • PARI
    my(N=30, x='x+O('x^N)); Vec(serlaplace(exp(1/(1-x)-exp(x))))
    
  • PARI
    a_vector(n) = my(v=vector(n+1)); v[1]=1; for(i=1, n, v[i+1]=sum(j=1, i, (j!-1)*binomial(i-1, j-1)*v[i-j+1])); v;

Formula

a(0) = 1; a(n) = Sum_{k=1..n} (k! - 1) * binomial(n-1,k-1) * a(n-k).
a(n) ~ exp(1/2 - exp(1) + 2*sqrt(n) - n) * n^(n - 1/4) / sqrt(2). - Vaclav Kotesovec, Jul 21 2022

A367971 Expansion of e.g.f. exp(exp(-x) - 1)/(1 - x).

Original entry on oeis.org

1, 0, 2, 1, 19, 43, 461, 2350, 22940, 185313, 1969105, 20981585, 255992617, 3300259584, 46394533498, 694535043925, 11123040844947, 189008829494295, 3402841007703469, 64648146404160854, 1293014652241452452, 27152832827254344741, 597366828915334031625
Offset: 0

Views

Author

Seiichi Manyama, Dec 06 2023

Keywords

Crossrefs

Programs

  • PARI
    a_vector(n) = my(v=vector(n+1)); v[1]=1; for(i=1, n, v[i+1]=sum(j=1, i, ((j-1)!+(-1)^j)*binomial(i-1, j-1)*v[i-j+1])); v;

Formula

a(0) = 1; a(n) = Sum_{k=1..n} ((k-1)! + (-1)^k) * binomial(n-1,k-1) * a(n-k).
a(n) = n! * Sum_{k=0..n} (-1)^k * Bell(k)/k!, where Bell() is A000110.
Showing 1-10 of 10 results.