Skip to content

BellY ​

The partial (incomplete) Bell polynomial Bn,k(x1,x2,… )B_{n,k}(x_1, x_2, \dots), by its textbook recurrence — built entirely from bigint binomial coefficients and compute-engine's own Add/Multiply, so it works the same for numeric or symbolic xix_i.

✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram LanguageBellY✓
BellY(n, k, xs)Bn,k(x1,…,xn−k+1)B_{n,k}(x_1, \dots, x_{n-k+1}), from the list xs.
Typed signatures
TypePackageApplies
(integer, integer, list) -> numberanalyticalways

Domain: Special functions

Details
  • Comtet's recurrence: Bn,k=∑i=1n−k+1(n−1i−1)xiBn−i,k−1B_{n,k} = \sum_{i=1}^{n-k+1} \binom{n-1}{i-1} x_i B_{n-i,k-1}, with B0,0=1B_{0,0}=1.
  • All-ones arguments give the Stirling numbers of the second kind; xj=j!x_j = j! gives the (unsigned) Lah numbers — both checked directly against Wolfram's BellY.
  • xs must have exactly n−k+1n-k+1 elements, matching Wolfram's own arity requirement.

Examples

3 more kept as data, checked against the oracles
Basic #
live ↗
InBellY(4,2,[x1,x2,x3])\mathrm{BellY}(4, 2, \bigl\lbrack\mathrm{x1}, \mathrm{x2}, \mathrm{x3}\bigr\rbrack)Out3x22+4x1x33\mathrm{x2}^2+4\mathrm{x1}\mathrm{x3}

The partial Bell polynomial B4,2B_{4,2} from three variables

live ↗
InBellY(4,2,[x1,x2,x3])\mathrm{BellY}(4, 2, \bigl\lbrack x_1, x_2, x_3\bigr\rbrack)Out3x22+4x1x33x_2^2+4x_1x_3
Applications #

Stays unexpanded for a sequence given symbolically with Array

live ↗
InBellY(6,2,Array(x,6))\mathrm{BellY}(6, 2, \mathrm{Array}(x, 6))OutBellY(6,2,[x(1),x(2),x(3),x(4),x(5),x(6)])\mathrm{BellY}(6, 2, \bigl\lbrack x(1), x(2), x(3), x(4), x(5), x(6)\bigr\rbrack)
Properties #

All-ones arguments give Stirling(6, 2)

live ↗
InBellY(6,2,[1,1,1,1,1])\mathrm{BellY}(6, 2, \bigl\lbrack1, 1, 1, 1, 1\bigr\rbrack)Out3131

xj=j!x_j = j! gives the Lah number L(4, 2)

live ↗
InBellY(4,2,[1,2,6])\mathrm{BellY}(4, 2, \bigl\lbrack1, 2, 6\bigr\rbrack)Out3636
About
Examples8
Checked againstWolfram Language 8 agree
CrosswalkWolfram Language

Implementation

primitive · kernela kernel — an algorithm over mutable state that would not be readable as a tree

nativeenginetypescriptpackages/symbols/analysis/analytic/src/bell-y.ts

See also: BellNumber, StirlingS2