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

A006472 a(n) = n!*(n-1)!/2^(n-1).

Original entry on oeis.org

1, 1, 3, 18, 180, 2700, 56700, 1587600, 57153600, 2571912000, 141455160000, 9336040560000, 728211163680000, 66267215894880000, 6958057668962400000, 834966920275488000000, 113555501157466368000000, 17373991677092354304000000, 2970952576782792585984000000
Offset: 1

Views

Author

Keywords

Comments

Product of first (n-1) positive triangular numbers. - Amarnath Murthy, May 19 2002, corrected by Alex Ratushnyak, Dec 03 2013
Number of ways of transforming n distinguishable objects into n singletons via a sequence of n-1 refinements. Example: a(3)=3 because we have XYZ->X|YZ->X|Y|Z, XYZ->Y|XZ->X|Y|Z and XYZ->Z|XY->X|Y|Z. - Emeric Deutsch, Jan 23 2005
In other words, a(n) is the number of maximal chains in the lattice of set partitions of {1, ..., n} ordered by refinement. - Gus Wiseman, Jul 22 2018
From David Callan, Aug 27 2009: (Start)
With offset 0, a(n) = number of unordered increasing full binary trees of 2n edges with leaf set {n,n+1,...,2n}, where full binary means each nonleaf vertex has two children, increasing means the vertices are labeled 0,1,2,...,2n and each child is greater than its parent, unordered might as well mean ordered and each pair of sibling vertices is increasing left to right. For example, a(2)=3 counts the trees with edge lists {01,02,13,14}, {01,03,12,14}, {01,04,12,13}.
PROOF. Given such a tree of size n, to produce a tree of size n+1, two new leaves must be added to the leaf n. Choose any two of the leaf set {n+1,...,2n,2n+1,2n+2} for the new leaves and use the rest to replace the old leaves n+1,...,2n, maintaining relative order. Thus each tree of size n yields (n+2)-choose-2 trees of the next size up. Since the ratio a(n+1)/a(n)=(n+2)-choose-2, the result follows by induction.
Without the condition on the leaves, these trees are counted by the reduced tangent numbers A002105. (End)
a(n) = Sum(M(t)N(t)), where summation is over all rooted trees t with n vertices, M(t) is the number of ways to take apart t by sequentially removing terminal edges (see A206494) and N(t) is the number of ways to build up t from the one-vertex tree by adding successively edges to the existing vertices (the Connes-Moscovici weight; see A206496). See Remark on p. 3801 of the Hoffman reference. Example: a(3) = 3; indeed, there are two rooted trees with 3 vertices: t' = the path r-a-b and t" = V; we have M(t')=N(t')=1 and M(t") =1, N(t")=2, leading to M(t')N(t') + M(t")N(t")=3. - Emeric Deutsch, Jul 20 2012
Number of coalescence sequences or labeled histories for n lineages: the number of sequences by which n distinguishable leaves can coalesce to a single sequence. The coalescence process merges pairs of lineages into new lineages, labeling each newly formed lineage l by a subset of the n initial lineages corresponding to the union of all initial lineages that feed into lineage l. - Noah A Rosenberg, Jan 28 2019
Conjecture: For n > 1, n divides 2*a(n-1) + 4 if and only if n is prime. - Werner Schulte, Oct 04 2020
For a proof of the above conjecture see Himane. The list of primes p such that p^2 divides (2*a(p-1) + 4) (analog of A007540 - Wilson primes) begins [239, 24049, ...]. - Peter Bala, Nov 06 2024
a(n) is the number of maximal chains in the poset of set of permutations of {1, ..., n} ordered by containment. - Rajesh Kumar Mohapatra, Sep 03 2025

Examples

			From _Gus Wiseman_, Jul 22 2018: (Start)
The a(3) = 3 maximal chains in the lattice of set partitions of {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)
From _Rajesh Kumar Mohapatra_, Sep 03 2025: (Start)
The a(3) = 3 maximal chains in the poset of the set of permutations of {1,2,3}:
  {(1)(2)(3)} < (12)(3) < (123)}
  {(1)(2)(3)} < (1)(23) < (123)}
  {(1)(2)(3)} < (13)(2) < (132)} (End)
		

References

  • Louis Comtet, Advanced Combinatorics, Reidel, 1974, p. 148.
  • László Lovász, Combinatorial Problems and Exercises, North-Holland, 1979, p. 165.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Mike Steel, Phylogeny: Discrete and Random Processes in Evolution, SIAM, 2016, p. 47.

Crossrefs

Cf. A000110, A000258, A002846, A005121, A213427, A317145, A363679 (sum of reciprocals).
For the type B and D analogs, see A001044 and A123385.

Programs

  • Magma
    [Factorial(n)*Factorial(n-1)/2^(n-1): n in [1..20]]; // Vincenzo Librandi, Aug 23 2018
    
  • Maple
    A006472 := n -> n!*(n-1)!/2^(n-1):
  • Mathematica
    FoldList[Times,1,Accumulate[Range[20]]] (* Harvey P. Dale, Jan 10 2013 *)
  • PARI
    a(n) = n*(n-1)!^2/2^(n-1) \\ Charles R Greathouse IV, May 18 2015
    
  • Python
    from math import factorial
    def A006472(n): return n*factorial(n-1)**2 >> n-1 # Chai Wah Wu, Jun 22 2022

Formula

a(n) = a(n-1)*A000217(n-1).
a(n) = A010790(n-1)/2^(n-1).
a(n) = polygorial(n, 3) = (A000142(n)/A000079(n))*A000142(n+1) = (n!/2^n)*Product_{i=0..n-1} (i+2) = (n!/2^n)*Pochhammer(2, n) = (n!^2/2^n)*(n+1) = polygorial(n, 4)/2^n*(n+1). - Daniel Dockery (peritus(AT)gmail.com), Jun 13 2003
a(n-1) = (-1)^(n+1)/(n^2*det(M_n)) where M_n is the matrix M_(i, j) = abs(1/i - 1/j). - Benoit Cloitre, Aug 21 2003
From Ilya Gutkovskiy, Dec 15 2016: (Start)
a(n) ~ 4*Pi*n^(2*n)/(2^n*exp(2*n)).
Sum_{n>=1} 1/a(n) = BesselI(1,2*sqrt(2))/sqrt(2) = 2.3948330992734... (End)
D-finite with recurrence 2*a(n) -n*(n-1)*a(n-1)=0. - R. J. Mathar, May 02 2022
Sum_{n>=1} (-1)^(n+1)/a(n) = BesselJ(1,2*sqrt(2))/sqrt(2). - Amiram Eldar, Jun 25 2022
From Rajesh Kumar Mohapatra, Sep 03 2025: (Start)
a(n) = A331955(n,n)
a(n) = A331956(n,n)
a(n) = A375835(n,n)
a(n) = A375837(n,n) (End)

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

A375836 Number of chains in the poset of permutations of [n].

Original entry on oeis.org

1, 1, 3, 17, 165, 2539, 57597, 1813797, 75733683, 4048845673, 269701306809, 21901093760303, 2129681860984785, 244316156443454237, 32650648748310672739, 5028367353617766838085, 884047390780977994754809, 175979907431515249448486007, 39376198947363790655257792497
Offset: 0

Views

Author

Rajesh Kumar Mohapatra, Aug 31 2024

Keywords

Examples

			Consider the set S = {1, 2, 3}. The a(3) = 6 + 8 + 3 = 17 in the poset of permutations of {1,2,3}:
|{(1)(2)(3), (1)(23), (2)(13), (3)(12), (123), (132)}| = 6;
|{(1)(2)(3) < (1)(23), (1)(2)(3) < (2)(13), (1)(2)(3) < (3)(12), (1)(2)(3) < (123),(1)(2)(3) < (132), (1)(23) < (123), (2)(13) < (132), (3)(12) < (123)}|=8;
|{(1)(2)(3) < (1)(23) < (123), (1)(2)(3) < (2)(13) < (132), (1)(2)(3) < (3)(12) < (123)}| = 3.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          n!+add(abs(Stirling1(n, k))*a(k), k=1..n-1)
        end:
    seq(a(n), n=0..18);  # Alois P. Heinz, Jul 01 2025
  • 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]]*Abs[StirlingS1[n, v]], {v, k, n - t}]]];
    a[n_] := Sum[b[n, k, 0], {k, 0, n}]; a /@ Range[0, 20]
  • Python
    from math import factorial as f
    from sympy.functions.combinatorial.numbers import stirling as s
    from functools import cache
    @cache
    def a(n): return f(n) + sum(abs(s(n, k, kind=1)) * a(k) for k in range(1, n)) # David Radcliffe, Jul 01 2025

Formula

a(n) = Sum_{k=0..n} A375835(n,k).
a(n) = n! + Sum_{k=1..n-1} abs(Stirling1(n,k))*a(k). - Rajesh Kumar Mohapatra, Jul 01 2025
a(n) = 2 * A375838(n) - 1. - Rajesh Kumar Mohapatra, Jul 01 2025

A375838 Number of rooted chains starting with the cycle (1)(2)(3)...(n) in the permutation poset of [n].

Original entry on oeis.org

1, 1, 2, 9, 83, 1270, 28799, 906899, 37866842, 2024422837, 134850653405, 10950546880152, 1064840930492393, 122158078221727119, 16325324374155336370, 2514183676808883419043, 442023695390488997377405, 87989953715757624724243004, 19688099473681895327628896249, 4919839221134662388853128069571, 1365091729320293490230304687026514
Offset: 0

Views

Author

Rajesh Kumar Mohapatra, Subhashree Sahoo, and Ranjan Kumar Dhani, Sep 10 2024

Keywords

Examples

			Consider the set S = {1, 2, 3}. The a(3) = 1 + 5 + 3 = 9 in the poset of permutations of {1,2,3}:
 |{(1)(2)(3)}| = 1;
 |{(1)(2)(3) < (1)(23), (1)(2)(3) < (2)(13), (1)(2)(3) < (3)(12), (1)(2)(3) < (123), (1)(2)(3) < (132)}|=5;
 |{(1)(2)(3) < (1)(23) < (123), (1)(2)(3) < (2)(13)< (132), (1)(2)(3) < (3)(12) < (123)}| = 3.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          1+add(abs(Stirling1(n, k))*a(k), k=1..n-1)
        end:
    seq(a(n), n=0..20);  # Alois P. Heinz, Jul 01 2025
  • Mathematica
    T[n_, k_] := T[n, k] = If[k < 0 || k > n, 0, If[(n == 0 && k == 0) || k == 1, 1, Sum[If[r >= 0, Abs[StirlingS1[n, r]]*T[r, k - 1], 0], {r, k - 1, n - 1}]]]; Table[Sum[T[n, k], {k, 0, n}], {n, 0, 20}] (* Vaclav Kotesovec, Jul 01 2025, after A375837 *)

Formula

a(n) = Sum_{k=0..n} A375837(n,k).
a(n) = (A375836(n)+1)/2.
Conjecture: a(n) = R(n,0) where R(n,k) = (k+1) * (Sum_{i=0..n-1} R(n-1,i) + Sum_{j=0..k-1} R(n-1,j)) for 0 <= k < n, R(n,n) = 1. - Mikhail Kurkov, Jun 21 2025
a(n) ~ c * n!^2 / (2^n * log(2)^n * n^(1-log(2)/3)), where c = A385521 = 1.59585433050036621247006569740016516964502505848324064247941890934119103861277... - Vaclav Kotesovec, Jul 01 2025
a(n) = 1 + Sum_{k=1..n-1} abs(Stirling1(n,k))*a(k). - Rajesh Kumar Mohapatra, Jul 01 2025

A375835 Triangle read by rows: T(n, k) is the number of chains of length k in the poset of permutations of an n-set.

Original entry on oeis.org

1, 0, 1, 0, 2, 1, 0, 6, 8, 3, 0, 24, 64, 59, 18, 0, 120, 574, 970, 695, 180, 0, 720, 5858, 16124, 20240, 11955, 2700, 0, 5040, 67752, 285264, 556591, 559895, 282555, 56700, 0, 40320, 880584, 5459712, 15519287, 23585870, 19879370, 8780940, 1587600, 0, 362880, 12746208, 113511982, 451541898, 971214825, 1213062690, 882179550, 347072040, 57153600
Offset: 0

Views

Author

Rajesh Kumar Mohapatra, Aug 31 2024

Keywords

Examples

			The triangle T(n,k) begins:
  n\k 0    1      2      3      4       5      6      7 ...
  0   1
  1   0    1
  2   0    2      1
  3   0    6      8      3
  4   0   24     64     59     18
  5   0  120    574    970    695     180
  6   0  720   5858  16124  20240   11955   2700
  7   0 5040  67752 285264 556591  559895 282555  56700
  ...
The T(3, 2) = 8 chains in the poset of the permutations of {1, 2, 3} are:
{(1)(2)(3) < (1)(23), (1)(2)(3) < (2)(13), (1)(2)(3) < (3)(12), (1)(2)(3) < (123),(1)(2)(3) < (132), (1)(23) < (123), (2)(13) < (132), (3)(12) < (123)}.
		

Crossrefs

Cf. A000007 (column k=0), A000142 (column k=1), A006472 (main diagonal), A375836 (row sums).

Programs

  • Maple
    b := proc(n, k, t) option remember; if k < 0 then return 0 fi; if {n, k} = {0} then return 1 fi; add(ifelse(k = 1, 1, b(v, k - 1, 1))*abs(Stirling1(n, v)), v = k..n-t) end: T := (n, k) -> b(n, k, 0): seq((seq(T(n, k), k=0..n)), n = 0..10);  # Peter Luschny, Sep 05 2024
  • Mathematica
    b[n_, k_, t_] := b[n, k, t] = If[k < 0, 0, If[n == 0 && k == 0, 1,
    Sum[If[k == 1, 1, b[v, k - 1, 1]] * Abs[StirlingS1[n, v]], {v, k, n - t}]]];
    T[n_, k_] := b[n, k, 0]; Table[T[n, k], {n, 0, 10}, {k, 0, n}]

Formula

Let Stirling1(n, k) denote the unsigned Stirling numbers of the first kind (A132393).
T(0, 0) = 1, T(0, k) = 0 for k > 0.
T(n, k) = Sum_{i_k=k..n} (Sum_{i_(k-1)=k-1..i_k - 1} (... (Sum_{i_2=2..i_3 - 1} (Sum_{i_1=1..i_2 - 1} Stirling1(n, i_k) * Stirling1(i_k, i_(k-1)) * ... * Stirling1(i_3, i_2) * Stirling1(i_2, i_1)))...)), where 1 <= k <= n.

A375837 Triangle read by rows: T(n,k) is the number of rooted chains starting with the cycle (1)(2)(3)...(n) of length k of permutation poset of n letters.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 5, 3, 0, 1, 23, 41, 18, 0, 1, 119, 455, 515, 180, 0, 1, 719, 5139, 10985, 9255, 2700, 0, 1, 5039, 62713, 222551, 334040, 225855, 56700, 0, 1, 40319, 840265, 4619447, 10899840, 12686030, 7193340, 1587600, 0, 1, 362879, 12383329, 101128653, 350413245, 620801580, 592261110, 289918440, 57153600
Offset: 0

Views

Author

Rajesh Kumar Mohapatra, Ranjan Kumar Dhani, and Subhashree Sahoo, Aug 31 2024

Keywords

Examples

			Triangle T(n,k) begins:
  n\k | 0  1   2     3     4      5      6     7 ...
 -----+-----------------------------------------
  0   | 1;
  1   | 0, 1;
  2   | 0, 1, 1;
  3   | 0, 1, 5, 3;
  4   | 0, 1, 23, 41, 18;
  5   | 0, 1, 119, 455, 515, 180;
  6   | 0, 1, 719, 5139, 10985, 9255, 2700;
  7   | 0, 1, 5039, 62713, 222551, 334040, 225855, 56700;
  ...
The T(3, 2) = 5 chains in the poset of the permutations of {1, 2, 3} are: {(1)(2)(3) < (1)(23), (1)(2)(3) < (2)(13), (1)(2)(3) < (3)(12), (1)(2)(3) < (123),(1)(2)(3) < (132)}.
		

Crossrefs

Cf. A000007 (column k=0), A057427 (column k=1), A006472 (diagonal), A375838 (row sums).

Programs

  • Mathematica
    T[n_, k_] := T[n, k] = If[k < 0 || k > n, 0, If[(n == 0 && k == 0) || k == 1, 1, Sum[If[r >= 0, Abs[StirlingS1[n, r]]*T[r, k - 1], 0], {r, k - 1, n - 1}]]]; Table[T[n, k], {n, 0, 20}, {k, 0, n}] // Flatten (* corrected Jul 01 2025 *)

Formula

Let Stirling1(n, k) denote the unsigned Stirling numbers of the first kind (A132393).
T(0, 0) = 1, T(0, k) = 0 for k > 0 and T(n, 1) = 1 for n > 1.
T(n, k) = Sum_{i_(k-1)=k-1..n-1} (Sum_{i_(k-2)=k-2..i_(k-1) - 1} (... (Sum_{i_2=2..i_3 - 1} (Sum_{i_1=1..i_2 - 1} Stirling1(n,i_(k-1)) * Stirling1(i_(k-1),i_(k-2)) * ... * Stirling1(i_3,i_2) * Stirling1(i_2,i_1)))...)), where 2 <= k <= n.
Showing 1-6 of 6 results.