Question:Code works fine in Maple 18 and Maple 2015 but not Maple 2016

Question:Code works fine in Maple 18 and Maple 2015 but not Maple 2016

Maple 2016

I have the following function which came from a collaborator of a collaborator. It computes a generating function for a family of function's we're using.

```GF_Generate := proc (n)
local summand, i, j;
summand := U[0]^x[0]*mul(U[i]^y[i], i = 1 .. n)*mul(binomial(x[0]+add(w[j], j = 1 .. i), y[i])*p^y[i]*(1-p)^(x[0]+add(w[j], j = 1 .. i)-y[i])*binomial(x[0]-1+add(w[j], j = 1 .. i), x[0]-1+add(w[j], j = 1 .. i-1))*v[i]^(x[0]+add(w[j], j = 1 .. i-1))*(1-v[i])^w[i], i = 1 .. n);

for j from n by -1 to 1 do summand := normal(sum(summand, y[j] = 0 .. infinity)) end do;
for j from n by -1 to 1 do summand := normal(sum(summand, w[j] = 0 .. infinity)) end do;

sum(summand, x[0] = 0 .. infinity)
end proc;```

For arguments of 2 and 3 it's quick and works fine on Maple18 (tested both GUI and terminal client on OS X), Maple2015 (tested terminal client only on RHEL linux), but generates a "too many levlels of recursion" error in Maple2016 (tested terminal client only on RHEL linux; same server as Maple2015 was tested). It's slow for arguments of 4 and above (45 minutes for n=4 on my mac laptop), so I haven't tested it thoroughly with larger arguments.

Any idea why this code fails in Maple 2016?

﻿