how can I make a variable local inside "product"?



Hi!

This is either a bug or I am using the wrong command:

test(n) := product(n+i,i,1,3);
or even
test(n) := block([i],return(product(n+i,i,1,3));

behave differently on input contaning "i" and those
not containing "i", e.g.

test(n-2*k) -> (n - 2 k + 1) (n - 2 k + 2) (n - 2 k + 3)

but(!!!)
test(n-2*i) -> (n - 3) (n - 2) (n - 1)


Is this a bug or did I do something wrong?


  Fabrizio