sum x^(n^2+n) from n = 0