TITLE: Is there a closed form expression for $1 + x + x^{4} + x^{9}+x^{16}+x^{25} +..+x^{k^2}$?
QUESTION [6 upvotes]: We all know what the sum of a geometric series is 
$1 + x + x^2 + x^3 + ... + x^k = \frac{x^{k+1} - 1}{x - 1}$ .
I was wondering if similar formulas exist in case the exponents  form some other sequence, for example are squares or cubes of positive integers?

REPLY [5 votes]: This question is not very meaningful unless you define what you mean by "closed form".
Suppose "closed form" means a rational function in $x$ and $x^n$, as in your example for $\sum_i x^i$:
$$R(x,x^n) = \frac{p(x,x^n)}{q(x,x^n)} = \sum_{i=0}^{n}x^{i^2}.$$
Then you know that when $|x|<1$ you can take the limit as $n\to\infty$ and get
$$ R(x,0) = \lim_{n\to\infty} R(x,x^n) = \sum_{i\geq0} x^{i^2} = \frac12 + \frac12\vartheta_3(0,x), $$
where $\vartheta_3$ is a Jacobi theta function.
But the right-hand side is not a rational function, which the left-hand side is, so such a rational function $R(x,x^n)$ cannot exist.