Mathematica How to Define a Complete Bell Polynomial in Mathematica?

AI Thread Summary
The discussion focuses on defining a function in Mathematica to compute the complete Bell polynomial, referred to as CBellY. The user seeks to create a function that utilizes the existing BellY function, which calculates partial Bell polynomials. The proposed definition for CBellY is given as a summation of BellY for varying values of k, with the input list being adjusted accordingly. The example provided demonstrates the successful implementation of this function, confirming that it correctly computes the complete Bell polynomial for a specified input. The interaction highlights the effective use of Mathematica's capabilities for mathematical computations involving combinatorial functions.
anthony2005
Messages
24
Reaction score
0
Hello,
how do you define a function or make a list with n elements, where n is any? More precisely there is a function in mathematica, BellY

BellY[n,k,\{x_{1},...x_{n-k+1}\}]

which gives the partial Bell polynomial. I would like to define in mathematica the complete Bell polynomial defined as

CBellY[n,\{x_{1},...x_{n}\}]=\sum_{k=1}^{n}BellY[n,k,\{x_{1},...x_{n-k+1}\}]

How can I do that?
Thank you.
 
Physics news on Phys.org
Temporarily I have Mathematica forget it knows BellY so you can see the details.

In[1]:= CBellY[n_,v_]:=Sum[BellY[n,k,Take[v,n-k+1]],{k,1,n}]

In[2]:= CBellY[3,{1,2,3}]

Out[2]= BellY[3,1,{1,2,3}]+BellY[3,2,{1,2}]+BellY[3,3,{1}]
 
Great, thank you very much!
 

Similar threads

Replies
1
Views
2K
Replies
17
Views
985
Replies
4
Views
2K
Replies
3
Views
2K
Replies
1
Views
2K
Replies
10
Views
2K
Back
Top