Mathematica variable arguments

  • Mathematica
  • Thread starter anthony2005
  • Start date
  • #1
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

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

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

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

How can I do that?
Thank you.
 

Answers and Replies

  • #2
1,069
29
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}]
 
  • #3
Great, thank you very much!
 

Related Threads on Mathematica variable arguments

Replies
2
Views
2K
Replies
8
Views
3K
Replies
2
Views
2K
Replies
3
Views
4K
Replies
3
Views
3K
Replies
3
Views
3K
Replies
1
Views
3K
Replies
2
Views
2K
Top