let $a_{n}$ is a given fixed sequence, say $a_{n}:=1/n$. I would like to define something like $$D_{j}:=\sum_{k=1}^{j}\frac{1}{j!}BellY[j,k,\{a_1,a_2,\dots,a_{j-k+1}\}].$$ Function BellY is implemented in Mathematica.

The problem is the variable number of inputs in BellY. How one can do that in Mathematica? Many thanks!

  • 2
    $\begingroup$ welcome to MSE. There are a number of ways to do things in Mathematica. This site strongly encourages your own attempts (as this is the best way to learn). "Please code..." requests and similar is not looked on favourably. You have the raw materials and a built-in function, so dive in and have fun from now on. Here is one way to get you started: a[j_] := 1/j; d[j_] := With[{tab = a /@ Range[j], c = j!}, Total[BellY @@ {j, j - # + 1, tab[[1 ;; #]]} & /@ Range[j, 1, -1]]/ c]. $\endgroup$ – ubpdqn Sep 27 '15 at 10:54

If BellY takes 3 arguments and deals with the sequence, you can write the Sum exactly like you would otherwise. Assign the sequence to a variable q, then pass it as an argument to BellY.

Take a look at this for pointers: https://reference.wolfram.com/language/ref/Sum.html

You might try something like this:

Dj = Sum[1/Factorial[j] * BellY[j,k,q],{k,1,j}]
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.