Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When given a single variable sequence, GeneratingFunction is automatically expressed in the most "direct form", for example,

GeneratingFunction[(i + 1) v[i - 1], i, x]

returns something like

2 x GeneratingFunction[v[i], i, x] + v[-1] + x^2 D[GeneratingFunction[v[i], i, x],x]

But, if I add an extra variable that does not otherwise affect the result

GeneratingFunction[(i + 1) v[i - 1, j], {i, j}, {x, y}]

then the function is not evaluated in the same way, although, it would seem that it would be correct to return

2 x GeneratingFunction[(i + 1) v[i - 1, j], {i, j}, {x, y}] + v[-1,j]
 + x^2 D[GeneratingFunction[(i + 1) v[i - 1, j], {i, j}, {x, y}],x]

what is happening here, how can I make it behave in a way that would fit this intuition?

share|improve this question

If you don't include j or y in GeneratingFunction[], then you get something like what you want:

GeneratingFunction[(i + 1) v[i - 1, j], i, x]
   2 x GeneratingFunction[v[i, j], i, x] + v[-1, j] +
   x^2 Derivative[0, 0, 1][GeneratingFunction][v[i, j], i, x]
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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