What you can do for instance is put all your coefficients (aka a0,a1, etc) in an array, then make a for loop through that array.
Just keep a value say x, and every time you enter the for loop, add x+ai*x
EDIT: Didn't read your third line for the summation thoroughly, instead of adding x+aix, you get in fact (n-1)x1+(n-2)a1x1+(n-3)a2*x2 etc, just write the full sum down for say x4 and you'll see what I mean, the approach is the same, the formula just changes a bit. Or you could just put all the x's in a different array as well, and then in the for loop, also loop through the previous x's
Although you can look at the iterative definition and convert it to an explicit formula, this gives a solution, no matter how efficient, that hides rather than exposes the original definition. For that reason I would go with the second approach - two arrays, x and a. Array a must be fully populated, and x must be given a value, then you can have a simple loop that fills in the remaining values for the x array.