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

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

A086053 Decimal expansion of Lengyel's constant L.

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Jul 07 2003

Keywords

Comments

L - log(Pi-1)/log(2) ~ 0.00000171037285384 ~ 1/Pi^11.5999410273. - Gerald McGarvey, Aug 17 2004

Examples

			1.0986858055251870130177463257213318079312220710644268407410427815783217...
		

References

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

Crossrefs

Formula

Equals lim_{n->oo} A005121(n) * (2*log(2))^n * n^(1+log(2)/3) / n!^2. - Amiram Eldar, Jun 27 2021

Extensions

More terms from Vaclav Kotesovec, Mar 11 2014

A131408 Repeated integer partitions or nested integer partitions.

Original entry on oeis.org

1, 1, 2, 5, 14, 35, 95, 248, 668, 1781, 4799, 12890, 34766, 93647, 252635, 681272, 1838135, 4958738, 13379885, 36100214, 97409045, 262833314, 709207394, 1913652308, 5163654671, 13933178390, 37596275726, 101446960109, 273737216768, 738632652929, 1993073801930
Offset: 0

Views

Author

Thomas Wieder, Jul 09 2007

Keywords

Comments

See A131407 for the labeled case (with much more explanation).
Also the number of sequences of distinct integer partitions (y_1, ..., y_k), containing no partitions of the form (111..1) other than (1), such that sum(y_1) = n and length(y_i) = sum(y_{i+1}) for all i = 1, ..., k-1. - Gus Wiseman, Jul 20 2018

Examples

			Let denote * an unlabeled element. Then a(n=3)=5 because we have [ *,*,* ], [ *, * ][ * ], [[ *,* ]][[ * ]], [[ *,* ][ * ]], [ * ][ * ][ * ].
From _Gus Wiseman_, Jul 20 2018: (Start)
The a(4) = 14 sequences of integer partitions:
  (4), (31), (22), (211),
  (4)(1), (31)(2), (22)(2), (211)(3), (211)(21),
  (31)(2)(1), (22)(2)(1), (211)(3)(1), (211)(21)(2),
  (211)(21)(2)(1).
(End)
		

Crossrefs

Programs

  • Maple
    A000041 := proc(n) combinat[numbpart](n) ; end: A008284 := proc(n,k) if k = 1 or k = n then 1; elif k > n then 0 ; else procname(n-1,k-1)+procname(n-k,k) ; fi ; end: A131408 := proc(n) option remember; local i ; if n <= 2 then n; else A000041(n)+add(A008284(n,i)*procname(i),i=2..n-1) ; fi ; end: for n from 1 to 40 do printf("%d,",A131408(n)) ; od: # R. J. Mathar, Aug 07 2008
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0 or i=1, 1,
          b(n, i-1) + b(n-i, min(n-i, i)))
        end:
    a:= proc(n) option remember; b(n$2)+
          add(b(n-i, min(n-i, i))*a(i), i=2..n-1)
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 03 2020
  • Mathematica
    t[, 1] = 1; t[n, k_] /; 1 <= k <= n := t[n, k] = Sum[t[n-i, k-1], {i, 1, n-1}] - Sum[t[n-i, k], {i, 1, k-1}]; t[, ] = 0; a[1]=1; a[2]=2; a[n_] := a[n] = PartitionsP[n] + Sum[t[n, i]*a[i], {i, 2, n-1}]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Feb 02 2017 *)
    roo[n_]:=If[n==1,{{{1}}},Join@@Cases[Most[IntegerPartitions[n]],y_:>Prepend[(Prepend[#,y]&/@roo[Length[y]]),{y}]]];
    Table[Length[roo[n]],{n,10}] (* Gus Wiseman, Jul 20 2018 *)

Formula

a(n) = A000041(n) + Sum_{i=2..n-1} A008284(n,i)*a(i).
a(n) ~ c * d^n, where d = A246828 = 2.69832910647421123126399866618837633..., c = 0.232635324064951140265176690908381464098550827908380222089145... . - Vaclav Kotesovec, Sep 04 2014

Extensions

Edited and extended by R. J. Mathar, Aug 07 2008
a(0)=1 prepended and edited by Alois P. Heinz, Sep 03 2020

A141799 Number of repeated integer partitions of n.

Original entry on oeis.org

1, 3, 8, 25, 66, 192, 511, 1418, 3812, 10383, 27958, 75758, 204215, 551821, 1488561, 4018722, 10842422, 29262357, 78955472, 213063551, 574905487, 1551325859, 4185959285, 11295211039, 30478118079, 82240300045, 221911189754, 598790247900, 1615732588962
Offset: 1

Views

Author

Thomas Wieder, Jul 05 2008

Keywords

Comments

An integer n can be partitioned into P(n) partitions P([n],i) where i=1,...,P(n) counts the partitions. The partition P([n],i) consists of T(n,i) integer parts t(i,j) with j=1,...,T(n,i). Now we perform on each t(i,j) an integer partition again and arrive at new partitions. Their parts can be partitioned again and so forth. We count such repeated partitions of n. One convention is necessary to avoid an infinite loop: The trivial partition P([n],1)=[n] will not be partitioned again but just counted once (and therefore we also have a(1)=1).

Examples

			For the integers 1, 2, 3 and 4 we have
[1] -> 1,
thus a(1)=1.
[2] -> 1,
[1,1] => [1] ->, [1] -> 1.
thus a(2)=3.
[3] -> 1,
[1,2] => [1] -> 1, [2] -> 3,
[1,1,1] => [1] -> 1, [1] -> 1, [1] -> 1,
thus a(3)=8.
[4] -> 1,
[1,3] => [1] -> 1, [3] -> 8,
[2,2] => [2] -> 3, [2] -> 3,
[1,1,2] => [1] -> 1, [1] -> 1, [2] -> 3,
[1,1,1,1] => [1] -> 1, [1] -> 1, [1] -> 1, [1] -> 1,
thus a(4)=25.
		

Crossrefs

Programs

  • Maple
    A141799 := proc(n) option remember ; local a,P,i,p ; if n =1 then 1; else a := 0 ; for P in combinat[partition](n) do if nops(P) > 1 then for i in P do a := a+procname(i) ; od: else a := a+1 ; fi; od: RETURN(a) ; fi ; end: for n from 1 to 40 do printf("%d,",A141799(n)) ; od: # R. J. Mathar, Aug 25 2008
    # second Maple program
    a:= proc(n) option remember;
          1+ `if`(n>1, b(n, n-1)[2], 0)
        end:
    b:= proc(n, i) option remember; local f, g;
          if n=0 or i=1 then [1, n]
        else f:= b(n, i-1); g:= `if`(i>n, [0, 0], b(n-i, i));
             [f[1]+g[1], f[2]+g[2] +g[1]*a(i)]
          fi
        end:
    seq(a(n), n=1..40); # Alois P. Heinz, Apr 05 2012
  • Mathematica
    a[n_] := a[n] = 1 + If[n>1, b[n, n-1][[2]], 0]; b[n_, i_] := b[n, i] = Module[{f, g}, If[n == 0 || i == 1, {1, n}, f = b[n, i-1]; g = If[i>n, {0, 0}, b[n-i, i]]; {f[[1]] + g[[1]], f[[2]] + g[[2]] + g[[1]]*a[i]}]]; Table[a[n], {n, 1, 40}] (* Jean-François Alcover, Oct 29 2015, after Alois P. Heinz *)

Formula

Let sum_{i=1}^P(n) denote the sum over all integer partitions P([n],i) of n. Let sum_{j=1}^T(i,j) denote the sum over all parts of the i-th integer partition. Then we have the recursive formula 1 if t(i,j)=n a(n) = sum_{i=1}^P(n) sum_{j=1}^T(i,j) { a(t(i,j)) else. E.g. a(4)=25 because [4] contributes 1, [1,3] contributes a(1)+a(3)=1+8=9, [2,2] contributes a(2)+a(2)=3+3=6, [1,1,2] contributes a(1)+a(1)+a(2)=1+1+3=5, [1,1,1,1] contributes a(1)+a(1)+a(1)+a(1)=1+1+1+1=4 which gives in total 25.
a(n) ~ c * d^n, where d = 2.69832910647421123126399866... (see A246828), c = 0.5088820425072641934222229579416714164592334575899644931509447692360546... . - Vaclav Kotesovec, Sep 04 2014

Extensions

Extended by R. J. Mathar, Aug 25 2008

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.

A143140 Total number of all repeated partitions of the n-set {1,2,3,...,n}.

Original entry on oeis.org

1, 1, 2, 11, 83, 787, 8965, 119170, 1810450, 30942699, 587606593, 12274606775, 279715819531, 6905395692990, 183588212652382, 5229549060414223, 158895798308201987, 5129671140284343035, 175343720698891809337, 6326623756471457351814, 240286954202031694593966
Offset: 0

Views

Author

Thomas Wieder, Jul 27 2008

Keywords

Comments

The corresponding unlabeled counterpart is sequence A143141.
See also A131407 = Repeated set partitions or nested set partitions. Possible coalitions among n persons.
See also A137731 = Repeated set splitting, labeled elements.
a(n) is the number of set partitions of the n-set plus sum of a(k) for all the k-sets (1 < k < n) that are contained (with multiplicity) in these set partitions. - Alois P. Heinz, Jul 27 2012

Examples

			a(1) = |{{{1}}}| = 1.
a(2) = |{{{1,2}}, {{1},{2}}}| = 2.
a(3) = |{{{1,2,3}}, {{1,2},{3}}, {{2},{1,3}}, {{1},{2,3}}, {{1},{2},{3}}}| + 3*a(2) = 5 + 3*2 = 11.
		

Crossrefs

Programs

  • Maple
    with(combinat):
    a:= proc(n) option remember;
          bell(n)+ add(a(k)*binomial(n, k)*bell(n-k), k=2..n-1)
        end:
    seq(a(n), n=0..25);  # Alois P. Heinz, Jul 26 2012
  • Mathematica
    a[n_] := a[n] = BellB[n]+Sum[a[k]*Binomial[n, k]*BellB[n-k], {k, 2, n-1}]; Table[a[n], {n, 0, 25}] (* Jean-François Alcover, Feb 05 2017, after Alois P. Heinz *)

Formula

a(n) = Bell(n) + Sum_{k=2..n-1} C(n,k)*Bell(n-k)*a(k) with Bell = A000110. - Alois P. Heinz, Jul 26 2012

Extensions

Edited by Thomas Wieder, Jul 26 2012
More terms from Alois P. Heinz, Jul 26 2012
a(0)=1 prepended by Alois P. Heinz, Sep 22 2016

A131965 a(n) = 1 + Sum_{i=2..n-1} n*a(i).

Original entry on oeis.org

1, 1, 1, 4, 21, 131, 943, 7701, 70409, 712891, 7921011, 95844233, 1254688141, 17670191319, 266412115271, 4281623281141, 73073037331473, 1319881736799731, 25155393101359579, 504505383866156001, 10621165976129600021, 234196709773657680463, 5397676549069062730671
Offset: 0

Views

Author

Thomas Wieder, Aug 02 2007

Keywords

Comments

a(n) = 1 + Sum_{i=2..n-1} 1*a(i) = 2^n; a(n) = 1 + Sum_{i=2..n-1} 2*a(i) = 3^n; etc. It seems that a(n+1)/(n*a(n)) -> 1 for n -> oo. [Comment corrected by Emeric Deutsch, Aug 10 2007]
Let M(n) denote the n X n matrix with ones along the subdiagonal, ones everywhere above the main diagonal, the integers 4, 5, etc., along the main diagonal, and zeros everywhere else. Then a(n) equals the permanent of M(n-2) for n >= 3. - John M. Campbell, Apr 20 2021

Examples

			a(4)=21 because 1 + 4*1 + 4*4 = 21.
		

Crossrefs

Programs

  • Magma
    m:=25; R:=PowerSeriesRing(Rationals(), m); b:=Coefficients(R!( (-8*(1+x) + 2*(3-x)*Exp(x) + (4+3*x^2-x^3))/(2*(1-x)^3) )); [Factorial(n-1)*b[n]: n in [1..m]]; // G. C. Greubel, Mar 09 2019
    
  • Maple
    rctlnn := proc(n::nonnegint) local j; option remember; if n = 0 then 0; else 1+add(n*procname(j), j=2..n-1); end if; end proc:
    a[1] := 1; for n from 2 to 18 do a[n] := 1+sum(n*a[i], i = 2 .. n-1) end do: seq(a[n], n = 1 .. 18); # Emeric Deutsch, Aug 10 2007
    # third Maple program:
    a:= proc(n) option remember;
          1+add(n*a(i), i=2..n-1)
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 03 2020
  • Mathematica
    a[1] = a[2] = 1; a[n_] := a[n] = (n^2*a[n-1]-1)/(n-1); Array[a, 30] (* Jean-François Alcover, Feb 08 2017 *)
  • Sage
    m = 25; T = taylor((-8*(1+x) + 2*(3-x)*exp(x) + (4+3*x^2-x^3))/(2*(1-x)^3), x, 0, m); [factorial(n)*T.coefficient(x, n) for n in (0..m)] # G. C. Greubel, Mar 09 2019

Formula

a(n) = 1 + Sum_{i=2..n-1} n*a(i).
E.g.f.: 1/2 * (x + (2*exp(x)-5)/(x-1)^2 -5/(x-1)).
Asymptotic expansion: a(n)/n! = (5/2 + e)*n^2 + O(n).
a(n) = (n+1)*a(n-1) + a(n-2) + ... + a(2), e.g., a(5) = 6*21 + 4 + 1 = 131.

Extensions

More terms from Emeric Deutsch, Aug 10 2007
a(0)=1 prepended and edited by Alois P. Heinz, Sep 03 2020
Showing 1-7 of 7 results.