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

A005121 Number of ultradissimilarity relations on an n-set.

Original entry on oeis.org

1, 1, 4, 32, 436, 9012, 262760, 10270696, 518277560, 32795928016, 2542945605432, 237106822506952, 26173354092593696, 3375693096567983232, 502995942483693043200, 85750135569136650473360, 16583651916595710735271248, 3611157196483089769387182064, 879518067472225603327860638128
Offset: 1

Views

Author

Keywords

Comments

First column in A154960. - Mats Granvik, Jan 18 2009
Number of chains from minimum to maximum in the lattice of set partitions of {1, ..., n} ordered by refinement. - Gus Wiseman, Jul 22 2018

Examples

			From _Gus Wiseman_, Jul 22 2018: (Start)
The (3) = 4 chains from minimum to maximum in the lattice of set partitions of {1,2,3}:
  {{1},{2},{3}} < {{1,2,3}}
  {{1},{2},{3}} < {{1},{2,3}} < {{1,2,3}}
  {{1},{2},{3}} < {{2},{1,3}} < {{1,2,3}}
  {{1},{2},{3}} < {{3},{1,2}} < {{1,2,3}}
(End)
		

References

  • L. Babai and T. Lengyel, A convergence criterion for recurrent sequences with application to the partition lattice, Analysis 12 (1992), 109-119.
  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, pp. 316-321.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = Sum[StirlingS2[n, k]*a[k], {k, 1, n-1}]; Array[a, 19]
    (* Jean-François Alcover, Jun 24 2011, after Vladeta Jovovic *)
  • PARI
    {a(n) = local(A); if( n<1, 0, for(k=1, n, A = truncate(A) + x*O(x^k); A = x - A + subst(A, x, exp(x + x*O(x^k)) - 1)); n! * polcoeff(A, n))} /* Michael Somos, Sep 22 2007 */

Formula

a(n) = Sum_{i=1..n-1} N_i(n), where N_k(m) = Sum_{j=k..m-1} Stirling2(m, j)*N_{k-1}(j), m=3..n, k=2..m-1; N_1(2)=N_1(3)=...=N_1(n)=1.
a(n) = Sum_{k=1..n-1} Stirling2(n, k)*a(k) [Lengyel]. - Vladeta Jovovic, Apr 16 2003
E.g.f. satisfies Z(z) = 1/2 * (Z(exp(z)-1) - z). [Lengyel]
Asymptotic growth: a(n) ~ C_L*(n!)^2*(2log(2))^(-n)*n^(-1-1/3*log(2)) (Babai and Lengyel), with C_L = 1.0986858055... = A086053 [Flajolet and Salvy].
Sum_{k>=1} a(k-1)/fallfac(n,k) = -1/n^2 + 2*Sum_{k>=1} a(k-1)/n^k, with the falling factorials fallfac(n,k) = Product_{j=0..k-1}(n-j). - Vaclav Kotesovec, Aug 04 2015

Extensions

More terms from Vladeta Jovovic, Apr 16 2003

A331957 Number of rooted chains in set partitions of {1, 2, ..., n}.

Original entry on oeis.org

1, 1, 2, 8, 64, 872, 18024, 525520, 20541392, 1036555120, 65591856032, 5085891210864, 474213645013904, 52346708185187392, 6751386193135966464, 1005991884967386086400, 171500271138273300946720, 33167303833191421470542496, 7222314392966179538774364128, 1759036134944451206655721276256
Offset: 0

Views

Author

S. R. Kannan and Rajesh Kumar Mohapatra, Feb 02 2020

Keywords

Comments

Also the number of chains of Stirling numbers of the second kind such that the first term of the chains is either {{1}, {2}, ..., {n}} or {{1,2,...,n}}.
Number of rooted fuzzy equivalence matrices of order n.

Examples

			The a(3) = 8 in the lattice of set partitions of {1,2,3}:
  {{1},{2},{3}},
  {{1},{2},{3}} < {{1,2},{3}},
  {{1},{2},{3}} < {{1,3},{2}},
  {{1},{2},{3}} < {{1},{2,3}},
  {{1},{2},{3}} < {{1,2,3}},
  {{1},{2},{3}} < {{1,2},{3}} < {{1,2,3}},
  {{1},{2},{3}} < {{1,3},{2}} < {{1,2,3}},
  {{1},{2},{3}} < {{1},{2,3}} < {{1,2,3}}.
Or,
  {{1,2,3}},
  {{1,2,3}} > {{1,2},{3}},
  {{1,2,3}} > {{1,3},{2}},
  {{1,2,3}} > {{1},{2,3}},
  {{1,2,3}} > {{1},{2},{3}},
  {{1,2,3}} > {{1},{2,3}} > {{1},{2},{3}},
  {{1,2,3}} > {{2},{1,3}} > {{1},{2},{3}},
  {{1,2,3}} > {{3},{1,2}} > {{1},{2},{3}}.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k, t) option remember; `if`(k<0 or k>n, 0, `if`(k=1 or
          {n, k}={0}, 1, add(b(v, k-1, 1)*Stirling2(n, v), v=k..n-t)))
        end:
    a:= n-> add(b(n, k, 0), k=0..n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Feb 09 2020
  • Mathematica
    b[n_, k_, t_] := b[n, k, t] = If[k < 0 || k > n, 0, If[k == 1 || Union@{n, k} =={0}, 1, Sum[b[v, k - 1, 1]*StirlingS2[n, v], {v, k, n - t}]]];
    a[n_] := Sum[b[n, k, 0], {k, 0, n}];
    a /@ Range[0, 30]
  • PARI
    b(n, k, t) = {if (k < 0, return(0)); if ((n==0) && (k==0), return (1)); if ((k==1) && (n>0), return(1)); sum(v = k, n - t, if (k==1, 1, b(v, k-1, 1))*stirling(n, v, 2));}
    a(n) = sum(k=0, n, b(n, k, 0); ); \\ Michel Marcus, Feb 09 2020
    
  • Python
    from sympy.functions.combinatorial.numbers import stirling as s
    from functools import cache
    @cache
    def a(n): return 1 + sum(s(n, k) * a(k) for k in range(1, n)) # David Radcliffe, Jul 01 2025

Formula

a(n) = Sum_{k=0..n} A331956(n,k).
Conjecture from Mikhail Kurkov, Jun 25 2025: (Start)
a(n) = R(n,0) where
R(0,0) = 1,
R(n,k) = (k+1) * Sum_{j=k..n-1} R(n-1,j) for 0 <= k < n,
R(n,n) = Sum_{j=0..n-1} R(n,j). (End)
a(n) ~ A086053 * n!^2 / (2^(n-1) * log(2)^n * n^(1 + log(2)/3)). - Vaclav Kotesovec, Jul 01 2025
a(n) = 1 + Sum_{k=1..n-1} Stirling2(n,k)*a(k). - Rajesh Kumar Mohapatra, Jul 01 2025

Extensions

More terms from Michel Marcus, Feb 08 2020

A330804 Number of chains in partitions of [n] ordered by refinement.

Original entry on oeis.org

1, 1, 3, 15, 127, 1743, 36047, 1051039, 41082783, 2073110239, 131183712063, 10171782421727, 948427290027807, 104693416370374783, 13502772386271932927, 2011983769934772172799, 343000542276546601893439, 66334607666382842941084991, 14444628785932359077548728255, 3518072269888902413311442552511
Offset: 0

Views

Author

S. R. Kannan, Rajesh Kumar Mohapatra, Jan 01 2020

Keywords

Comments

Also the number of fuzzy equivalence matrices of order n.
Number of chains of equivalence relations on a set of n-elements.
Number of chains in Stirling numbers of the second kind.
Number of chains in the unordered partition of {1,...,n}.

Examples

			Consider the set S = {1, 2, 3}. The a(3) = 5+ 7+ 3 = 15 in the lattice of set partitions of {1,2,3}:
{{1},{2},{3}}  {{1},{2},{3}} < {{1,2},{3}}  {{1},{2},{3}} < {{1,2},{3}} < {{1,2,3}}
{{1,2},{3}}    {{1},{2},{3}} < {{1,3},{2}}  {{1},{2},{3}} < {{1,3},{2}} < {{1,2,3}}
{{1,3},{2}}    {{1},{2},{3}} < {{1},{2,3}}  {{1},{2},{3}} < {{1},{2,3}} < {{1,2,3}}
{{1},{2,3}}    {{1},{2},{3}} < {{1,2,3}}
{{1,2,3}}      {{1,2},{3}} < {{1,2,3}}
               {{1,3},{2}} < {{1,2,3}}
               {{1},{2,3}} < {{1,2,3}}
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k, t) option remember; `if`(k<0, 0, `if`({n, k}={0}, 1,
          add(`if`(k=1, 1, b(v, k-1, 1))*Stirling2(n, v), v=k..n-t)))
        end:
    a:= n-> add(b(n, k, 0), k=0..n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Feb 07 2020
    # second Maple program:
    a:= proc(n) option remember; uses combinat;
          bell(n) + add(stirling2(n, i)*a(i), i=1..n-1)
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Sep 03 2020
  • Mathematica
    b[n_, k_, t_] := b[n, k, t] = If[k < 0, 0, If[Union@{n, k} == {0}, 1, Sum[If[k == 1, 1, b[v, k - 1, 1]]*StirlingS2[n, v], {v, k, n - t}]]];
    a[n_] := Sum[b[n, k, 0], {k, 0, n}];
    a /@ Range[0, 20] (* Jean-François Alcover, Feb 08 2020, after Alois P. Heinz *)
  • PARI
    b(n, k, t) = {if (k < 0, return(0)); if ((n==0) && (k==0), return (1)); sum(v = k, n - t, if (k==1, 1, b(v, k-1, 1))*stirling(n, v, 2));}
    a(n) = sum(k=0, n, b(n, k, 0);); \\ Michel Marcus, Feb 08 2020

Formula

a(n) = Sum_{k=0..n} A331955(n,k).
a(n) = Bell(n) + Sum_{i=1..n-1} Stirling2(n,i)*a(i). - Alois P. Heinz, Sep 03 2020
a(n) ~ A086053 * n!^2 / (2^(n-2) * log(2)^n * n^(1 + log(2)/3)). - Vaclav Kotesovec, Jul 01 2025
a(n) = 2 * A331957(n) - 1 = 4 * A005121(n) - 1 for n > 1. - Rajesh Kumar Mohapatra, Jul 01 2025

Extensions

More terms from Michel Marcus, Feb 07 2020

A131407 Repeated set partitions or nested set partitions. Possible coalitions among n persons.

Original entry on oeis.org

1, 1, 2, 11, 95, 1307, 27035, 788279, 30812087, 1554832679, 98387784047, 7628836816295, 711320467520855, 78520062277781087, 10127079289703949695, 1508987827451079129599, 257250406707409951420079, 49750955749787132205813743, 10833471589449269308161546191
Offset: 0

Views

Author

Thomas Wieder, Jul 09 2007, Jul 20 2007

Keywords

Comments

Consider a set N={1,2,3,...n}. We can apply the operation S~(N) on N which gives us the set partitions S~(N)=SP(N) of N. Let denote SP_i(N) such a set partition, then SP(N)={SP_1(N), SP_2(N)...,SP_B(n)} (There are B(n) set partitions of N with B(n) as the Bell number). Observe that in each SP(N) we have SP(1)={{1,2,3,...,n}} and SP(B(n))={{1},{2},{3},...,{n}} and their magnitudes are |SP(1)|=1 and |SP(B(n)|=n.
Now we perform an iteration on the set partitions SP_i(N). We set partition each SP_i(N), thus we perform S~(SP_i(N), but we exclude SP(1)={{1,2,3,...,n}} and SP(B(n))={{1},{2},{3},...,{n}} from this repetition. Otherwise an infinite recursion arises. Thus if 1 < |SP_i(N)|=m < n, then we apply S~ on SP_i(N) again and get S~(SP_i(N))= SP(SP_i(N))={SP_1(SP_i(N)),...,SP_B(m)(SP_i(N))}. We repeat this partition operation S~ on every set partition we encounter. Let denote U_k a subset of SP_i(X) were X is a set. X may be any of the subsequent set partitions. Since |U_k| < X (under the condition above on m) the repeated application of S~ will end in set partitions SP(X) with |SP(X)| = 1.
Let us consider the example N={1,2,3}. The S~(N) gives us {{1,2,3}}, {{1,2},{3}}, {{1,3},{2}}, {{2,3},{13}} and {{1},{2},{1}}. We exclude {{1,2,3}} and {{1},{2},{1}} from further partitioning. From {{1,2},{3}} we get {{{1,2},{3}}} and {{{1,2}},{{3}}}. Consider the last two partitions. They correspond to N'={1',2'} and are thus {{1',2'}} and {{1'},{2'}}. Since |{{1',2'}}|=1 and |{{1'},{2'}}|=2 these last two set partitions cannot be partitioned any further according to our condition above. In total we get {{1,2,3}}, {{1,2},{3}}, {{1,3},{2}}, {{2,3},{1}}, {{{1,2},{3}}}, {{{1,2}},{{3}}}, {{{1,3},{2}}}, {{{1,3}},{{2}}}, {{{2,3},{1}}}, {{{2,3}},{{1}}}, {{1},{2},{3}} and we have a(3)=11.
A possible application are the number of coalitions among the set N={1,2,...,n} of n persons. These persons will split into parties = subsets U_k of N. Then coalitions will form among these parties, thus we encounter sets of subsets. It is even possible that coalitions form coalitions in turn. We thus define a coalition structure as a set of repeated set partitions. For example if n=6 we could have {{1,2},{3}},{{4,5,6}}, the parties {1,2} and {3} form the coalition {{1,2},{3}}. Since {{456}}={4,5,6} one might not want to consider a single set as a coalition, but formally it is possible to do so. However, if in the example all three parties are patriotic, they may stand together in questions of national interest and the coalition structure would be {{{1,2},{3}},{{4,5,6}}}.
However, in my opinion, the usual definition of a coalition as a partition of a set falls too short.
See also A005121 = Ultradissimilarity relations on an n-set. The paper "On the Asymptotic Analysis of a Class of Linear Recurrences" (by Thomas Prellberg) outlines how to find an asymptotic formula for A005121. Perhaps this method is applicable to the present sequence as well, but one needs to have the generating function as starting point.

Examples

			a(3)=11 because we have
  {{1,2,3}},
  {{1,2},{3}},
  {{1,3},{2}},
  {{2,3},{1}},
  {{{1,2},{3}}},
  {{{1,2}},{{3}}},
  {{{1,3},{2}}},
  {{{1,3}},{{2}}},
  {{{2,3},{1}}},
  {{{2,3}},{{1}}},
  {{1},{2},{3}}.
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge, 2003, p. 319 and 556.

Crossrefs

Programs

  • Maple
    rctlnn := proc(n::nonnegint) # Thanks to Joe Riel, who suggested the use of # "procname" instead of "rctlnn" within the program.
    local j; option remember; if n = 0 then 1; else bell(n)+add(stirling2(n,j)*procname(j), j=2..n-1); end if; end proc:
    # second Maple program:
    a:= proc(n) option remember; uses combinat;
          bell(n) + add(stirling2(n, i)*a(i), i=2..n-1)
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Apr 05 2012
  • Mathematica
    a[n_] := a[n] = If[n<2, 1, BellB[n] + Sum[StirlingS2[n, i]*a[i], {i, 2, n-1}]]; Table[a[n], {n, 0, 20}] (* Jean-François Alcover, Jul 15 2015, after Alois P. Heinz *)

Formula

Recurrence: a(n) = Bell(n) + Sum_{i=2..n-1} S2(n,i)*a(i). E.g.: a(n=4) = Bell(4) + S2(4,2) a(2) + S2(4,3) a(3) = 15+2+7*2+6*11 = 95. "closed" formula: a(n=4) = Bell(n=4) + Sum_{i1=2..(n=4)-1} Bell(i1) + S2(n,i1)*Sum_{i2=2..i1-1} Bell(i2) + S2(i1,i2)*Sum_{i3=2..i2-1} Bell(i3) + S2(i2,i3)*Sum_{i4=2..i3-1} Stirling2(i3,i4).
a(n) ~ 3 * L * (n!)^2 / (n^(1+log(2)/3) * (2*log(2))^n), where L = Lengyel's constant A086053 = 1.0986858055... . - Vaclav Kotesovec, Sep 04 2014

Extensions

a(0)=1 prepended by Alois P. Heinz, Sep 02 2020

A260932 Decimal expansion of a constant related to A246040.

Original entry on oeis.org

9, 0, 3, 1, 6, 4, 6, 7, 4, 9, 5, 8, 4, 6, 6, 2, 4, 7, 3, 2, 1, 6, 6, 0, 9, 9, 1, 5, 9, 4, 5, 1, 4, 2, 3, 5, 0, 5, 0, 0, 8, 7, 5, 7, 9, 2, 4, 4, 1, 0, 5, 1, 5, 5, 6, 2, 9, 7, 8, 8, 9, 9, 3, 1, 6, 8, 5, 7, 6, 1, 3, 4, 6, 2, 8, 1, 6, 8, 3, 0, 2, 2, 3, 1, 1, 0, 7, 9, 9, 9, 8, 3, 6, 9, 4, 4, 3, 0, 1, 5, 5, 7, 5, 1, 4, 9, 8, 2
Offset: 0

Views

Author

Vaclav Kotesovec, Aug 04 2015

Keywords

Comments

Variant of Lengyel's constant A086053.

Examples

			0.9031646749584662473216609915945142350500875792441051556...
		

Crossrefs

Formula

Equals lim_{n->oo} A246040(n) / ((-1)^(n+1)*(n!)^2/(n^(1-log(2)/3)*(2*log(2))^n)).
Equals lim_{n->oo} A086555(n) * 2^n * log(2)^n * n^(1 - log(2)/3) / n!^2. - Vaclav Kotesovec, Jul 01 2025

A242938 Decimal expansion of c_e, coefficient associated with the asymptotic evaluation c_e*2^(n^2/4) of the number of subspaces of the n-dimensional vector space over the finite field F_2, n being even.

Original entry on oeis.org

7, 3, 7, 1, 9, 6, 8, 8, 0, 1, 4, 6, 1, 3, 1, 6, 5, 0, 9, 1, 5, 3, 1, 9, 1, 2, 0, 8, 2, 6, 8, 0, 9, 1, 5, 8, 8, 8, 5, 8, 7, 6, 3, 5, 4, 7, 2, 2, 6, 6, 2, 2, 6, 6, 8, 9, 4, 3, 5, 4, 6, 1, 0, 4, 2, 3, 1, 0, 1, 5, 6, 7, 4, 3, 0, 0, 0, 7, 2, 8, 9, 4, 4, 7, 5, 7, 0, 8, 8, 2, 4, 7, 8, 0, 5, 5, 6, 9, 9, 5
Offset: 1

Views

Author

Jean-François Alcover, May 27 2014

Keywords

Examples

			7.3719688014613165091531912...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 5.7 Lengyel's constant, p. 318.

Crossrefs

Programs

  • Mathematica
    digits = 100; EllipticTheta[3, 0, 1/2]/NProduct[1-2^(-j), {j, 1, Infinity}, WorkingPrecision -> digits + 10, NProductFactors -> digits] // RealDigits[#, 10, digits]& // First
    RealDigits[EllipticTheta[3, 0, 1/2]/QPochhammer[1/2, 1/2], 10, 100][[1]] (* Vladimir Reshetnikov, Oct 17 2016 *)
  • PARI
    th3(x)=1 + 2*suminf(n=1,x^n^2)
    th3(1/2)/prodinf(n=1,1-2.^-n) \\ Charles R Greathouse IV, Jun 06 2016

Formula

(Sum_(k=-infinity..infinity) q^(-k^2)) / (prod_(j>0) (1-q^(-j))), with q = 2.

A242939 Decimal expansion of c_o, coefficient associated with the asymptotic evaluation c_o*2^(n^2/4) of the number of subspaces of the n-dimensional vector space over the finite field F_2, n being odd.

Original entry on oeis.org

7, 3, 7, 1, 9, 4, 9, 4, 9, 0, 7, 6, 6, 2, 2, 7, 3, 3, 7, 5, 4, 1, 4, 1, 1, 8, 3, 3, 6, 7, 2, 8, 6, 8, 2, 3, 7, 7, 1, 6, 1, 5, 2, 3, 9, 5, 6, 3, 9, 7, 4, 0, 7, 7, 8, 9, 6, 4, 7, 5, 7, 5, 9, 1, 7, 1, 3, 3, 4, 7, 7, 8, 2, 2, 2, 8, 5, 8, 7, 6, 5, 7, 6, 8, 3, 3, 1, 3, 3, 8, 3, 0, 2, 7, 4, 3, 6, 6, 5, 9
Offset: 1

Views

Author

Jean-François Alcover, May 27 2014

Keywords

Examples

			7.37194949076622733754141...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 5.7 Lengyel's constant, p. 318.

Crossrefs

Programs

  • Mathematica
    digits = 100; EllipticTheta[2, 0, 1/2]/NProduct[1 - 2^(-j), {j, 1, Infinity}, WorkingPrecision -> digits + 10, NProductFactors -> digits] // RealDigits[#, 10, digits]& // First
    RealDigits[EllipticTheta[2, 0, 1/2]/QPochhammer[1/2, 1/2], 10, 100][[1]] (* Vladimir Reshetnikov, Oct 17 2016 *)

A385521 Decimal expansion of a constant related to A375838.

Original entry on oeis.org

1, 5, 9, 5, 8, 5, 4, 3, 3, 0, 5, 0, 0, 3, 6, 6, 2, 1, 2, 4, 7, 0, 0, 6, 5, 6, 9, 7, 4, 0, 0, 1, 6, 5, 1, 6, 9, 6, 4, 5, 0, 2, 5, 0, 5, 8, 4, 8, 3, 2, 4, 0, 6, 4, 2, 4, 7, 9, 4, 1, 8, 9, 0, 9, 3, 4, 1, 1, 9, 1, 0, 3, 8, 6, 1, 2, 7, 7, 4, 3, 8, 1, 3, 9, 3, 5, 8, 2, 4, 0, 2, 3, 5, 5, 5, 9, 9, 6, 5, 8, 7, 7, 1, 8, 3
Offset: 1

Views

Author

Vaclav Kotesovec, Jul 01 2025

Keywords

Comments

Variant of Lengyel's constant A086053.

Examples

			1.59585433050036621247006569740016516964502505848324064247941890934119103861277...
		

Crossrefs

Formula

Equals lim_{n->oo} A375838(n) * 2^n * log(2)^n * n^(1-log(2)/3) / n!^2.
Showing 1-8 of 8 results.