Gauss sum is a sum of $p$ roots of unity with magnitude $\sqrt{p}$. Does another sum with such property exist? 


More exactly. Let $p$ be a prime number. $\zeta^p=1,\;\zeta\ne 1$. Causs sum: $G=\sum\_{i=0}^{p-1}\zeta^{i^2}$. We know that $|G|=\sqrt p$. I am looking for $a\_0,\ldots,a\_{p-1}\in N\_0$: $∑a\_i=p;|\sum\_{i=0}^{p−1}a\_i\zeta^i|=\sqrt p$ 


I would be surprised if this problem had not previously been studied. Has anybody seen it before?



not Gauss sum with the same magnitude
[A paper by Cavior](http://www.jstor.org/stable/2034027) does just that. It also follows from the method in [Elkies' answer](https://mathoverflow.net/questions/135949/a-question-on-maps-from-mathbbz-p-mathbbz-to-itself) to a previous MO-question. 


