Hi David -
I've noticed that sometimes, if the very first time a formula is assessed, the result is zero, I get an error. I don't know if this could be the issue here.
If n=1, does the formula return zero?
My work around is to write a formula that never returns zero, and then let the DC evaluate it. Once it has accepted a non-zero value, I can edit the formula to allow a zero value, and it seems to work fine. (An example of when this comes up is a RotX, RotY, or RotZ value that is set by a user input box; I initially get an error if the value in the box is zero, but if I start with a non-zero value in the user input box when I create the formula in the RotY attribute, it works fine, even if I set it back to zero.)
I don't know if this is related to what you're doing here, but it may be worth a shot if you have the result of the formula set to zero when n=1.