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
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}}.
- Alois P. Heinz, Table of n, a(n) for n = 0..261
- S. R. Kannan and Rajesh Kumar Mohapatra, Counting the Number of Non-Equivalent Classes of Fuzzy Matrices Using Combinatorial Techniques, arXiv preprint arXiv:1909.13678 [math.GM], 2019.
- V. Murali, Equivalent finite fuzzy sets and Stirling numbers, Inf. Sci., 174 (2005), 251-263.
- R. B. Nelsen and H. Schmidt, Jr., Chains in power sets, Math. Mag., 64 (1) (1991), 23-31.
-
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
-
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]
-
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
-
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
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
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}}
- Alois P. Heinz, Table of n, a(n) for n = 0..262
- S. R. Kannan and Rajesh Kumar Mohapatra, Counting the Number of Non-Equivalent Classes of Fuzzy Matrices Using Combinatorial Techniques, arXiv preprint arXiv:1909.13678 [math.GM], 2019.
- V. Murali, Equivalent finite fuzzy sets and Stirling numbers, Inf. Sci., 174 (2005), 251-263.
- R. B. Nelsen and H. Schmidt, Jr., Chains in power sets, Math. Mag., 64 (1) (1991), 23-31.
-
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
-
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 *)
-
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
A330663
Number of non-isomorphic balanced reduced multisystems of weight n and maximum depth.
Original entry on oeis.org
1, 1, 2, 4, 20, 140, 1411
Offset: 0
Non-isomorphic representatives of the a(2) = 2 through a(4) = 20 multisystems:
{1,1} {{1},{1,1}} {{{1}},{{1},{1,1}}}
{1,2} {{1},{1,2}} {{{1,1}},{{1},{1}}}
{{1},{2,3}} {{{1}},{{1},{1,2}}}
{{2},{1,1}} {{{1,1}},{{1},{2}}}
{{{1}},{{1},{2,2}}}
{{{1,1}},{{2},{2}}}
{{{1}},{{1},{2,3}}}
{{{1,1}},{{2},{3}}}
{{{1}},{{2},{1,1}}}
{{{1,2}},{{1},{1}}}
{{{1}},{{2},{1,2}}}
{{{1,2}},{{1},{2}}}
{{{1}},{{2},{1,3}}}
{{{1,2}},{{1},{3}}}
{{{1}},{{2},{3,4}}}
{{{1,2}},{{3},{4}}}
{{{2}},{{1},{1,1}}}
{{{2}},{{1},{1,3}}}
{{{2}},{{3},{1,1}}}
{{{2,3}},{{1},{1}}}
The non-maximal version is
A330474.
The case where the leaves are sets (as opposed to multisets) is
A330677.
The case with all atoms distinct is
A000111.
The case with all atoms equal is (also)
A000111.
Cf.
A000311,
A004114,
A005121,
A006472,
A007716,
A048816,
A141268,
A306186,
A330470,
A330655,
A330664.
A330675
Number of balanced reduced multisystems of maximum depth whose atoms constitute a strongly normal multiset of size n.
Original entry on oeis.org
1, 1, 2, 6, 43, 440, 7158, 151414
Offset: 0
The a(2) = 2 and a(3) = 6 multisystems:
{1,1} {{1},{1,1}}
{1,2} {{1},{1,2}}
{{1},{2,3}}
{{2},{1,1}}
{{2},{1,3}}
{{3},{1,2}}
The a(4) = 43 multisystems (commas and outer brackets elided):
{{1}}{{1}{11}} {{1}}{{1}{12}} {{1}}{{1}{22}} {{1}}{{1}{23}} {{1}}{{2}{34}}
{{11}}{{1}{1}} {{11}}{{1}{2}} {{11}}{{2}{2}} {{11}}{{2}{3}} {{12}}{{3}{4}}
{{1}}{{2}{11}} {{1}}{{2}{12}} {{1}}{{2}{13}} {{1}}{{3}{24}}
{{12}}{{1}{1}} {{12}}{{1}{2}} {{12}}{{1}{3}} {{13}}{{2}{4}}
{{2}}{{1}{11}} {{2}}{{1}{12}} {{1}}{{3}{12}} {{1}}{{4}{23}}
{{2}}{{2}{11}} {{13}}{{1}{2}} {{14}}{{2}{3}}
{{22}}{{1}{1}} {{2}}{{1}{13}} {{2}}{{1}{34}}
{{2}}{{3}{11}} {{2}}{{3}{14}}
{{23}}{{1}{1}} {{23}}{{1}{4}}
{{3}}{{1}{12}} {{2}}{{4}{13}}
{{3}}{{2}{11}} {{24}}{{1}{3}}
{{3}}{{1}{24}}
{{3}}{{2}{14}}
{{3}}{{4}{12}}
{{34}}{{1}{2}}
{{4}}{{1}{23}}
{{4}}{{2}{13}}
{{4}}{{3}{12}}
The case with all atoms equal is
A000111.
The case with all atoms different is
A006472.
The version allowing all depths is
A330475.
The version where the atoms are the prime indices of n is
A330665.
The (weakly) normal version is
A330676.
The version where the degrees are the prime indices of n is
A330728.
Multiset partitions of strongly normal multisets are
A035310.
Series-reduced rooted trees with strongly normal leaves are
A316652.
Cf.
A000311,
A000669,
A001055,
A001678,
A005121,
A005804,
A316651,
A318812,
A330467,
A330474,
A330625,
A330628,
A330664,
A330677,
A330679.
-
strnorm[n_]:=Flatten[MapIndexed[Table[#2,{#1}]&,#]]&/@IntegerPartitions[n];
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
totm[m_]:=Prepend[Join@@Table[totm[p],{p,Select[mps[m],1
A330665
Number of balanced reduced multisystems of maximal depth whose atoms are the prime indices of n.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 5, 1, 1, 1, 2, 1, 3, 1, 5, 1, 1, 1, 7, 1, 1, 1, 5, 1, 3, 1, 2, 2, 1, 1, 16, 1, 2, 1, 2, 1, 5, 1, 5, 1, 1, 1, 11, 1, 1, 2, 16, 1, 3, 1, 2, 1, 3, 1, 27, 1, 1, 2, 2, 1, 3, 1, 16, 2, 1, 1, 11, 1
Offset: 1
The a(n) multisystems for n = 2, 6, 12, 24, 48:
{1} {1,2} {{1},{1,2}} {{{1}},{{1},{1,2}}} {{{{1}}},{{{1}},{{1},{1,2}}}}
{{2},{1,1}} {{{1,1}},{{1},{2}}} {{{{1}}},{{{1,1}},{{1},{2}}}}
{{{1}},{{2},{1,1}}} {{{{1},{1}}},{{{1}},{{1,2}}}}
{{{1,2}},{{1},{1}}} {{{{1},{1,1}}},{{{1}},{{2}}}}
{{{2}},{{1},{1,1}}} {{{{1,1}}},{{{1}},{{1},{2}}}}
{{{{1}}},{{{1}},{{2},{1,1}}}}
{{{{1}}},{{{1,2}},{{1},{1}}}}
{{{{1},{1}}},{{{2}},{{1,1}}}}
{{{{1},{1,2}}},{{{1}},{{1}}}}
{{{{1,1}}},{{{2}},{{1},{1}}}}
{{{{1}}},{{{2}},{{1},{1,1}}}}
{{{{1},{2}}},{{{1}},{{1,1}}}}
{{{{1,2}}},{{{1}},{{1},{1}}}}
{{{{2}}},{{{1}},{{1},{1,1}}}}
{{{{2}}},{{{1,1}},{{1},{1}}}}
{{{{2},{1,1}}},{{{1}},{{1}}}}
The last nonzero term in row n of
A330667 is a(n).
The non-maximal version is
A318812.
Other labeled versions are
A330675 (strongly normal) and
A330676 (normal).
Cf.
A001055,
A005121,
A005804,
A050336,
A213427,
A292505,
A317144,
A318849,
A320160,
A330474,
A330475,
A330679.
-
primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
totm[m_]:=Prepend[Join@@Table[totm[p],{p,Select[mps[m],1
A330676
Number of balanced reduced multisystems of weight n and maximum depth whose atoms cover an initial interval of positive integers.
Original entry on oeis.org
1, 1, 2, 8, 70, 1012, 21944, 665708, 26917492, 1399033348, 90878863352, 7214384973908, 687197223963640, 77354805301801012, 10158257981179981304, 1539156284259756811748, 266517060496258245459352, 52301515332984084095078308, 11546416513975694879642736152
Offset: 0
The a(0) = 1 through a(3) = 8 multisystems:
{} {1} {1,1} {{1},{1,1}}
{1,2} {{1},{1,2}}
{{1},{2,2}}
{{1},{2,3}}
{{2},{1,1}}
{{2},{1,2}}
{{2},{1,3}}
{{3},{1,2}}
The case with all atoms equal is
A000111.
The case with all atoms different is
A006472.
The version allowing all depths is
A330655.
The version where the atoms are the prime indices of n is
A330665.
The strongly normal version is
A330675.
The version where the degrees are the prime indices of n is
A330728.
Multiset partitions of normal multisets are
A255906.
Series-reduced rooted trees with normal leaves are
A316651.
Cf.
A000669,
A001055,
A005121,
A005804,
A318812,
A330469,
A330474,
A330654,
A330664,
A330677,
A330679.
-
allnorm[n_]:=If[n<=0,{{}},Function[s,Array[Count[s,y_/;y<=#]+1&,n]]/@Subsets[Range[n-1]+1]];
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
mps[set_]:=Union[Sort[Sort/@(#/.x_Integer:>set[[x]])]&/@sps[Range[Length[set]]]];
totm[m_]:=Prepend[Join@@Table[totm[p],{p,Select[mps[m],1
-
EulerT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v, n, 1/n))))-1, -#v)}
R(n, k)={my(v=vector(n), u=vector(n)); v[1]=k; for(n=1, #v, for(i=n, #v, u[i] += v[i]*(-1)^(i-n)*binomial(i-1, n-1)); v=EulerT(v)); u}
seq(n)={concat([1], sum(k=1, n, R(n, k)*sum(r=k, n, binomial(r, k)*(-1)^(r-k))))} \\ Andrew Howroyd, Dec 30 2020
A010796
a(n) = n!*(n+1)!/2.
Original entry on oeis.org
1, 6, 72, 1440, 43200, 1814400, 101606400, 7315660800, 658409472000, 72425041920000, 9560105533440000, 1491376463216640000, 271430516305428480000, 57000408424139980800000, 13680098021793595392000000, 3720986661927857946624000000
Offset: 1
-
[Factorial(n)* Factorial(n+1) / 2: n in [1..20]]; // Vincenzo Librandi, Jun 11 2013
-
Table[n! (n + 1)! / 2, {n, 1, 20}] (* Vincenzo Librandi, Jun 11 2013 *)
Times@@@Partition[Range[20]!,2,1]/2 (* Harvey P. Dale, Jul 04 2017 *)
-
for(n=1,30, print1(n!*(n+1)!/2, ", ")) \\ G. C. Greubel, Feb 07 2018
A008826
Triangle of coefficients from fractional iteration of e^x - 1.
Original entry on oeis.org
1, 1, 3, 1, 13, 18, 1, 50, 205, 180, 1, 201, 1865, 4245, 2700, 1, 875, 16674, 74165, 114345, 56700, 1, 4138, 155477, 1208830, 3394790, 3919860, 1587600, 1, 21145, 1542699, 19800165, 90265560, 182184030, 167310360, 57153600, 1, 115973, 16385857, 335976195, 2338275240, 7342024200, 11471572350, 8719666200, 2571912000
Offset: 2
Triangle starts:
1;
1, 3;
1, 13, 18;
1, 50, 205, 180;
1, 201, 1865, 4245, 2700;
1, 875, 16674, 74165, 114345, 56700;
1, 4138, 155477, 1208830, 3394790, 3919860, 1587600;
...
The f-vector of (the fine subdivision of) the Bergman complex of the complete graph K_3 is (1, 3). The f-vector of the Bergman complex of K_4 is (1, 13, 18). - _Harry Richman_, Mar 30 2023
- L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 148.
Alternating row sums are signed factorials
A133942(n-1).
Cf.
A000110,
A000111,
A000258,
A002846,
A005121,
A008277,
A306186,
A317176,
A318813,
A320154,
A330667,
A330679,
A330784.
-
b:= proc(n) option remember; expand(`if`(n=1, 1,
add(Stirling2(n, j)*b(j)*x, j=0..n-1)))
end:
T:= (n, k)-> coeff(b(n), x, k):
seq(seq(T(n, k), k=1..n-1), n=2..10); # Alois P. Heinz, Mar 31 2023
-
a[n_, x_] := Sum[ StirlingS2[n, k]*a[k, x]*x, {k, 0, n-1}]; a[1, ] = 1; Table[ CoefficientList[ a[n, x], x] // Rest, {n, 2, 10}] // Flatten (* _Jean-François Alcover, Dec 11 2012, after Vladeta Jovovic *)
sps[{}]:={{}};sps[set:{i_,_}]:=Join@@Function[s,Prepend[#,s]&/@sps[Complement[set,s]]]/@Cases[Subsets[set],{i,_}];
tots[m_]:=Prepend[Join@@Table[tots[p],{p,Select[sps[m],1Gus Wiseman, Jan 02 2020 *)
A087047
a(n) = n*(n+1)*(n+2)*a(n-1)/6 for n >= 1; a(0) = 1.
Original entry on oeis.org
1, 1, 4, 40, 800, 28000, 1568000, 131712000, 15805440000, 2607897600000, 573737472000000, 164088916992000000, 59728365785088000000, 27176406432215040000000, 15218787602040422400000000, 10348775569387487232000000000, 8444600864620189581312000000000, 8182818237816963704291328000000000
Offset: 0
Enrico T. Federighi (rico125162(AT)aol.com), Aug 08 2003
a(4) = (1/32)*(1/81)*24*120*720 = 800.
- Karl Dienger, Beiträge zur Lehre von den arithmetischen und geometrischen Reihen höherer Ordnung, Jahres-Bericht Ludwig-Wilhelm-Gymnasium Rastatt, Rastatt, 1910. [Annotated scanned copy]
- Djamel Himane, A simple proof of Werner Schulte's conjecture, arXiv:2404.08646 [math.GM], 2024
- Ana Luzón, Manuel A. Morón, and José L. Ramírez, Differential Equations in Ward's Calculus, ResearchGate, September 2023.
- Eric Weisstein's World of Mathematics, Tetrahedral Number.
-
a[0]:=1: for n from 1 to 20 do a[n]:=n*(n+1)*(n+2)*a[n-1]/6 od: seq(a[n],n=0..17); # Emeric Deutsch, Mar 06 2005
seq(mul(binomial(k+2, 3), k=1..n), n=0..16); # Zerinvary Lajos, Aug 07 2007
-
Table[Product[k*(k+1)*(k+2)/6,{k,1,n}],{n,0,16}] (* Alexander Adamchuk, May 19 2006 *)
a[n_]:=Denominator[SeriesCoefficient[HypergeometricPFQ[{1},{1,2,3},6x],{x,0,n}]]; Array[a,18,0] (* Stefano Spezia, Oct 13 2023 *)
-
q=50 # change q for more terms
[2^(-n-1)*3^(-n)*factorial(n)*factorial(n+1)*factorial(n+2) for n in [0..q]] # Tom Edgar, Mar 15 2014
Example and formula corrected by
Tom Edgar, Mar 15 2014
A331955
Triangle T(n,k) of number of chains of length k in partitions of an n-set ordered by refinement.
Original entry on oeis.org
1, 0, 1, 0, 2, 1, 0, 5, 7, 3, 0, 15, 45, 49, 18, 0, 52, 306, 640, 565, 180, 0, 203, 2268, 8176, 13055, 9645, 2700, 0, 877, 18425, 108388, 279349, 359555, 227745, 56700, 0, 4140, 163754, 1523922, 5967927, 11918270, 12822110, 7095060, 1587600
Offset: 0
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 5 7 3
4 0 15 45 49 18
5 0 52 306 640 565 180
6 0 203 2268 8176 13055 9645 2700
7 0 877 18425 108388 279349 359555 227745 56700
...
The T(3,2) = 7 in the lattice of set partitions of {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,3},{2}} < {{1,2,3}},
{{1},{2,3}} < {{1,2,3}}.
- Alois P. Heinz, Rows n = 0..140, flattened
- S. R. Kannan and Rajesh Kumar Mohapatra, Counting the Number of Non-Equivalent Classes of Fuzzy Matrices Using Combinatorial Techniques, arXiv preprint arXiv:1909.13678 [math.GM], 2019.
- V. Murali, Equivalent finite fuzzy sets and Stirling numbers, Inf. Sci., 174 (2005), 251-263.
- V. Murali, Combinatorics of counting finite fuzzy subsets, Fuzzy Sets Syst., 157(17)(2006), 2403-2411.
- R. B. Nelsen and H. Schmidt, Jr., Chains in power sets, Math. Mag., 64 (1) (1991), 23-31.
-
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:
T:= (n, k)-> b(n, k, 0):
seq(seq(T(n, k), k=0..n), n=0..10); # Alois P. Heinz, Feb 07 2020
-
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}]]];
T[n_, k_] := b[n, k, 0];
Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 08 2020, after Alois P. Heinz *)
T[n_, k_] := T[n, k] = If[k < 0 || k > n, 0, If[(n == 0 && k == 0), 1, If[k == 1, BellB[n], Sum[If[r >= 0, StirlingS2[n, r]*T[r, k - 1], 0], {r, k - 1, n - 1}]]]]; Table[T[n, k], {n, 0, 10}, {k, 0, n}] // Flatten (* Rajesh Kumar Mohapatra, Jul 02 2025 *)
-
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));}
T(n, k) = b(n, k, 0);
matrix(8, 8, n, k, T(n-1, k-1)) \\ to see the triangle \\ Michel Marcus, Feb 08 2020
Comments