login
A354794
Triangle read by rows. The Bell transform of the sequence {m^m | m >= 0}.
33
1, 0, 1, 0, 1, 1, 0, 4, 3, 1, 0, 27, 19, 6, 1, 0, 256, 175, 55, 10, 1, 0, 3125, 2101, 660, 125, 15, 1, 0, 46656, 31031, 9751, 1890, 245, 21, 1, 0, 823543, 543607, 170898, 33621, 4550, 434, 28, 1, 0, 16777216, 11012415, 3463615, 688506, 95781, 9702, 714, 36, 1
OFFSET
0,8
COMMENTS
For the definition of the Bell transform see A264428. The Bell transform of {(-m)^m | m >= 0} is A039621. The numbers A039621(n, k) are known as the Lehmer-Comtet numbers of 2nd kind. We think it is more natural to use Bell_{n, k}({m^m}) as the basis for the definition (and let the triangle start at (0, 0)).
T(n+1, k) is the number of partitions of 2*n-k labeled balls into a set of n subsets, by allocating the first n-k into their own subsets, then distributing the n remaining balls such that the n-k remaining subsets are nonempty. - Natalia L. Skirrow, Jan 03 2026
REFERENCES
Louis Comtet, Advanced Combinatorics. Reidel, Dordrecht, 1974, p. 139-140.
LINKS
Andrei Z. Broder, The r-Stirling numbers, Discrete Mathematics vol. 49 iss. 3 pp. 241-259, 1984.
D. H. Lehmer, Numbers Associated with Stirling Numbers and x^x, Rocky Mountain J. Math., 15(2) 1985, pp. 461-475.
Peter Luschny, The Bell transform.
Wikipedia, Bell polynomials.
FORMULA
T(n, k) = Bell_{n, k}(A000312), where Bell_{n, k} is the partial Bell polynomial evaluated over the powers m^m (with 0^0 = 1). See the Mathematica program.
T(n, k) = Sum_{j=0..k-1} (-1)^j*(n-j-1)^(n - 1)/(j! * (k-1-j)!) for 0 <= k < n and T(n, n) = 1.
T(n, k) = r(k-1, n-k, n-k) for n,k >= 1 and T(0, 0) = 1, where r(n, k, m) = m*r(n, k-1, m) + r(n-1, k, m+1) and r(n, 0, m) = 1. (see Vladimir Kruchinin's formula in A039621).
Sum_{k=1..n} binomial(k + x - 1, k-1)*(k-1)!*T(n, k) = (n + x)^(n - 1) for n >= 1.
Sum_{k=1..n} (-1)^(k + j)*Stirling1(k, j)*T(n, k) = n^(n-j)*binomial(n-1, j-1) for n >= 1, which are, up to sign, the coefficients of the Abel polynomials (A137452).
From Werner Schulte, Jun 14 2022 and Jun 19 2022: (Start)
E.g.f. of column k >= 0: (Sum_{i>0} (i-1)^(i-1) * t^i / i!)^k / k!.
Conjecture: T(n, k) = Sum_{i=0..n-k} A048994(n-k, i) * A048993(n+i-1, n-1) for 0 < k <= n and T(n, 0) = 0^n for n >= 0; proved by Mike Earnest, see link at A354797. (End)
From Natalia L. Skirrow, Jan 03 2026: (Start)
As an r-subset number, T(n+1, k) = Stirling2(n-k; 2*n-k, n).
Sum_{i=0..m} Stirling2(n+i, k+m)*Stirling1(m, i) = Sum_{j=0..n-k} C(n-m-k, j) * C(k+j, j) * j! * T(n+1, k+j+1) * (-1)^j.
Special case: Stirling2(n, k) = Sum_{j=0..n-k} C(n-k, j)*C(k+j, j)*j!*T(n+1, k+j+1)*(-1)^j. (End)
Conjectures from Mikhail Kurkov, Apr 20 2026: (Start)
T(n, k) = k * T(n, k+1) + T(n-1, k-1) + (n-k-1) * T(n-1, k) with T(n, 0) = 0^n, T(n, k) = 0 for k < 0 or k > n.
T(n, k) = Sum_{j=0..n-k} binomial(n+j-1, k-1) * A075856(n-k, j).
T(n+1, k+1) = Sum_{j=k..n} T(n, j) * A291978(j, k). (End)
From Peter Luschny, May 08 2026: (Start)
T(n, k) = (n!/k!) * [z^n] (1 - exp(-T(z)))^k where T(z) is the Cayley tree EGF (A000169).
The row polynomials P(n, x) are given by Sum_{n>=0} P(n, x) * z^n/n! = exp(x*(1 - exp(W(-z)))) where W denotes Lambert's W function.
P(n + 1, x) = x * Sum_{k=0..n} binomial(n, k) * k^k * P(n - k, x) = x * Sum_{k=0..n} A395701(n, k) * P(n - k, x) is a recurrence for the row polynomials starting with P(0, x) = 1. From this recurrence the recurrence of the coefficients given above by Mikhail Kurkov can be derived. (End)
From Peter Luschny, May 10 2026: (Start)
The rows of the array T(n + k, k) are given by linear recurrences with recurrence coefficients RCrow(n) = [(-1)^(j + 1)*binomial(2*n + 1, j), j = 1..2*n+1].
(Sum_{k=0..n} A395929(n, k) * x^k) / (1 - x)^(2*n + 1) is the generating function of the n-th row of the array A. (See A395908 for the case n = 3.) (End)
EXAMPLE
Triangle T(n, k) begins:
[0] 1;
[1] 0, 1;
[2] 0, 1, 1;
[3] 0, 4, 3, 1;
[4] 0, 27, 19, 6, 1;
[5] 0, 256, 175, 55, 10, 1;
[6] 0, 3125, 2101, 660, 125, 15, 1;
[7] 0, 46656, 31031, 9751, 1890, 245, 21, 1;
[8] 0, 823543, 543607, 170898, 33621, 4550, 434, 28, 1;
[9] 0, 16777216, 11012415, 3463615, 688506, 95781, 9702, 714, 36, 1;
.
Seen as an array A(n, k) = T(n + k, k):
[0] 1, 1, 1, 1, 1, 1, ... A000012
[1] 0, 1, 3, 6, 10, 15, ... A000217
[2] 0, 4, 19, 55, 125, 245, ... A215862
[3] 0, 27, 175, 660, 1890, 4550, ... A395908
[4] 0, 256, 2101, 9751, 33621, 95781, ...
[5] 0, 3125, 31031, 170898, 688506, 2263065, ...
[6] 0, 46656, 543607, 3463615, 15958405, 59411605, ...
MAPLE
T := (n, k) -> if n = k then 1 else
add((-1)^j*(n-j-1)^(n-1)/(j!*(k-1-j)!), j = 0.. k-1) fi:
seq(seq(T(n, k), k = 0..n), n = 0..9);
# Alternative: using the function BellMatrix from A264428:
BellMatrix(n -> n^n, 9);
# Alternative:
R := proc(n, k, m) option remember;
if k < 0 or n < 0 then 0 elif k = 0 then 1 else
m*R(n, k-1, m) + R(n-1, k, m+1) fi end:
A039621 := (n, k) -> ifelse(n = 0, 1, R(k-1, n-k, n-k)):
# Alternative: using the EGF.
N := 9: x := 'x': z := 'z': T := series(-LambertW(-z), z, N + 1):
F := exp(x*(1 - exp(-T))): EGF := series(F, z, N+1):
A354794row := n -> seq(coeff(simplify(coeff(EGF, z, n) * n!), x, k), k = 0..n):
seq(A354794row(n), n = 0..N); # Peter Luschny, May 08 2026
MATHEMATICA
Unprotect[Power]; Power[0, 0] = 1; pow[n_] := n^n;
R = Range[0, 9]; T[n_, k_] := BellY[n, k, pow[R]];
Table[T[n, k], {n, R}, {k, 0, n}] // Flatten
PROG
(Python)
from functools import cache
@cache
def t(n, k, m):
if k < 0 or n < 0: return 0
if k == 0: return n ** k
return m * t(n, k - 1, m) + t(n - 1, k, m + 1)
def A354794(n, k): return t(k - 1, n - k, n - k) if n != k else 1
for n in range(9): print([A354794(n, k) for k in range(n + 1)])
(Python)
from math import factorial
def ArrayRow(n: int, size: int) -> list[int]:
if size <= 0: return []
row = [1 if n == 0 else 0]
for k in range(1, size):
total = 0; comb = 1
for j in range(k):
term = comb * pow(n + k - j - 1, n + k - 1)
total += term if j % 2 == 0 else -term
comb = comb * (k - 1 - j) // (j + 1)
row.append(total // factorial(k - 1))
return row
for n in range(8): print([n], ArrayRow(n, 9)) # Peter Luschny, May 10 2026
(PARI) \\ using function bell_matrix from A264428
bell_matrix(n -> n^n, 9) \\ Peter Luschny, May 07 2026
(PARI) inverse_bell_matrix_row(n, f) = { my(A, v1 = vector(n-1, i, f(i)), v2 = vector(n, i, 0)); v2[1] = 1; for(i=2, n, A = 1; v2[i] = sum(j=1, i-1, A *= -(i-n-j)/j; ((1-n)*A - (i-n)*A/(j+1)) * v2[i-j] * v1[j]) / (i-1)); Vecrev(v2) }
row(n) = if(n==0, [1], concat(0, inverse_bell_matrix_row(n, x->-(x-1)!))) \\ Mikhail Kurkov, May 08 2026
(PARI) bell_matrix_column(n, k, f) = { my(A, v1 = vector(n-1, i, f(i)), v2 = vector(n, i, 0)); v2[1] = 1; for(i=2, n, A = 1; v2[i] = sum(j=1, i-1, A *= (i+k-j)/j; ((k+1)*A - (i+k)*A/(j+1)) * v2[i-j] * v1[j]) / (i-1)); v2 } \\ computes first n elements of the k-th column starting from the first nonzero element (equals 1)
column(n, k) = bell_matrix_column(n, k, x->x^x) \\ Mikhail Kurkov, May 09 2026
(SageMath)
def A354794triangle(size: int) -> list[list[int]]:
R.<x> = PolynomialRing(ZZ)
mm = [1] + [m^m for m in range(1, size+1)]
P = [R(1)]
for n in range(size):
Qrow = [0]*(n + 1) # A395701
binom = 1
for m in range(n+1):
if m > 0: binom = binom * (n - m + 1) // m
Qrow[m] = binom * mm[m]
P.append(x * sum(Qrow[m] * P[n-m] for m in range(n+1)))
return [p.list() for p in P]
for row in A354794triangle(9): print(row) # Peter Luschny, May 08 2026
CROSSREFS
Cf. A264428, A039621 (signed variant), A195979 (row sums), A000312 (column 1), A045531 (column 2), A281596 (column 3), A281595 (column 4), A000217 (row 1), A215862 (row 2), A395908 (row 3), A354795 (matrix inverse), A137452 (Abel), A000169 (Euler/Cayley's tree function).
Sequence in context: A327366 A327069 A327334 * A394530 A355401 A195596
KEYWORD
nonn,tabl,changed
AUTHOR
Peter Luschny, Jun 09 2022
STATUS
approved