Let $a$ be an element of some ring or field, possibly finite.
Is there closed form for $\sum_{i=1}^n{a^{i^2}}$?
sage and wolframalpha couldn't solve it.
If $a$ is primitive n-th root of unity this is Gauss sum and the result is $\sqrt{n}$ or $i\sqrt{n}$ for odd prime $n$.