On equation $x_1^{\frac{p-1}4}+\cdots+x_s^{\frac{p-1}4}\equiv n\pmod p.$ Let $p\equiv 1\pmod 4$ be a prime. I relize that the smallest positive integer $s$ such that the equation $x_1^{\frac{p-1}2}+\cdots+x_s^{\frac{p-1}2}\equiv n\pmod p$ has integer solution $(x_1,\ldots,x_s)$ for any $n$, is $\dfrac{p-1}2$. I showed that by a remark that $x^{\frac{p-1}2}\equiv 0,\pm1\pmod{p}$. 
Now the question is for $\frac{p-1}4$. That is: For given $p\equiv 1\pmod 4$, $p$ is prime. Find the smallest positive integer number  $s$ such that the equation $x_1^{\frac{p-1}4}+\cdots+x_s^{\frac{p-1}4}\equiv n\pmod p$ always has integer solution for any $n$. 
For example: 
+/  $p=5$ then $s=2$.
+/  $p=13$ then $s=3$. 
 A: Write $p=a^2+b^2$, $a > b> 0$. It is enough to find the minimal $s$ such that $\mathbb{F}_p=\sum_{i=1}^s{\{0,\pm a,\pm b\}}$. 
That’s because, up to an additive isomorphism, the set of $\frac{p-1}{4}$-th powers in $\mathbb{F}_p$ is $\{0,\pm a,\pm b\}$. More precisely, the set $P$ of $(p-1)/4$-th powers in $\mathbb{F}_p$ satisfies $aP=\{0,\pm a,\pm b\}$. 
Now, let $\alpha$ and $\beta$ be integers and assume $\alpha a + \beta b$ is divisible by $p$. Then, for some integer $k$, $(\alpha-ka)a=(-\beta+kb)b$, so we have an integer $l$ such that $\alpha=ka+lb$, $\beta=kb-la$. 
So let $\Gamma$ denote the free subgroup of $\mathbb{Z}^2$ of which $(a,b)$, $(b,-a)$ is a base. We want to find the smallest $s$ such that for any $x \in \mathbb{Z}^2/\Gamma$, $x$ has a representer with $\ell^1$ norm $\leq s$. 
In other words, we want to find the $\ell^1$ distance from $\mathbb{Z}^2$ to $\Gamma$. 
We claim that this distance is at most $a$, yielding $s \leq a < \sqrt{p}$. 
Indeed, consider a couple $(s,t)$ such that $|s|+|t| > a$. Let us prove that there is an equivalent couple mod $\Gamma$ with a smaller $\ell^1$ norm. Up to a rotation we can assume $s \geq |t|$, so $s > a/2$. So we consider the equivalent couple mod $\Gamma$ $(s-a,t-b)$. If $|s-a|+|t-b| < |s|+|t|$ we are done, in particular when $|t-b| \leq |t|$. 
So in the problematic case, we have $t < b/2$ and $-b \leq |t|-|t-b| \leq |s-a|-|s|$ so $a-b \leq 2s \leq a+b < 2a$. Therefore $|s-a|+|t-b|=(a-s)+(b-t)=a+b-s-t$. 
If $t \geq 0$ (still assuming $|s-a|+|t-b| \geq |s|+|t|$), $|s-a|+|t-b| = (a+b)-(|s|+|t|) < a+b-a =b < a$ and we get a contradiction.
If, however, $t < 0$, $|s-a|+|b-t|=(a+b)+2|t|-(|s|+|t|) < b+2|t|$ thus $t < (b-a)/2$. We remain in that case till the end of the answer. 
Now, if $s \leq b$, $|s-b|+|t+a|=b-s+t+a=a-(|s|+|t|)+b < b < a$ and we are done by considering $(s,t)-(b,-a)$. 
Else, $|s-b|+|t+a| = s-b+t+a=(s+t)+(a-b)=(|s|+|t|)+2t+a-b < |s|+|t|$ and we are done. QED.
