Let $p$ be a prime number of the form $4k+1$. Suppose that $r$ is a quadratic residue of $p$ and that $s$ is a quadratic nonresidue of $p$. Show that $p=a^{2}+b^{2}$, where \[a=\frac{1}{2}\sum^{p-1}_{i=1}\left( \frac{i(i^{2}-r)}{p}\right), b=\frac{1}{2}\sum^{p-1}_{i=1}\left( \frac{i(i^{2}-s)}{p}\right).\] Here, $\left( \frac{k}{p}\right)$ denotes the Legendre Symbol.
Problem
Source:
Tags: quadratics, Additive Number Theory, pen
25.05.2007 03:25
Peter wrote: Let $p$ be a prime number of the form $4k+1$. Suppose that $r$ is a quadratic residue of $p$ and that $s$ is a quadratic nonresidue of $p$. Show that $p=a^{2}+b^{2}$, where \[a=\frac{1}{2}\sum^{p-1}_{i=1}\left( \frac{i(i^{2}-r)}{p}\right), b=\frac{1}{2}\sum^{p-1}_{i=1}\left( \frac{i(i^{2}-s)}{p}\right).\] Here, $\left( \frac{k}{p}\right)$ denotes the Legendre Symbol. Quite nice!! Solution is not very hard to be found,but I just wonder how can somebody find the such an identity originally? Proof:Firstly, Denote \[M_{r}=\frac{1}{2}\sum^{p-1}_{i=1}\left( \frac{i(i^{2}-r)}{p}\right)\], then, if $r,t$ are both quadrati residues, suppose that $r\equiv u^{2}t (mod p)$ \[\frac{1}{2}\sum^{p-1}_{i=1}\left( \frac{i(i^{2}-r)}{p}\right)= a=\frac{1}{2}\sum_{k=ju,1 \le j\le p-1}\left( \frac{k(k^{2}-r)}{p}\right)=\frac{1}{2}\sum^{p-1}_{j=1}\left( \frac{ju(j^{2}u^{2}-u^{2}t)}{p}\right)=\frac{1}{2}\left(\frac{u}{p}\right ) \sum^{p-1}_{j=1}\left( \frac{j(j^{2}-t)}{p}\right)\] then we find that $M_{r}^{2}= M_{t}^{2}$ By the same way ,we can prove that $M_{r}^{2}=M_{t}^{2}$,if $r,t$ are both not quadratic residues. $M_{0}=0$ is obvious. So \[(a^{2}+b^{2})\frac{p-1}{2}=\sum_{r=0}^{p-1}M_{r}=\sum_{r=0}^{p-1}(\frac{1}{2}\sum^{p-1}_{i=1}\left( \frac{i(i^{2}-r)}{p}\right))^{2}= \frac{1}{4}\left (\sum_{r=0}^{p-1}\sum^{p-1}_{i=1}\left (\left( \frac{i(i^{2}-r)}{p}\right)\right)^{2}+\sum_{i\not=j}\sum_{r=0}^{p-1}{\left( \frac{ij(j^{2}-r)(i^{2}-r)}{p}\right)\right)=\frac{1}{4}\left (\frac{(p-1)(2p-1)}{2}+\sum_{i\not=j}\sum_{r=0}^{p-1}{\left( \frac{ij((r-2^{-1}(i^{2}+j^{2}))^{2}-4^{-1}(i^{2}-j^{2})^{2})}{p}\right)\right)=}}\] \[\frac{1}{4}\left (\sum_{i\not=j}\sum_{r=0}^{p-1}{\frac{(p-1)(2p-1)}{2}+\sum_{i\not=j}\left(\frac{ij}{p}\right)\sum_{r=0}^{p-1}{\left( \frac{(r^{2}-4^{-1}(i^{2}-j^{2})^{2})}{p}\right)\right)}=}\] \[\frac{1}{4}\left(\frac{(p-1)(2p-1)}{2}+\sum_{i\not=j,i^{2}-j^{2}\not \equiv 0}-\left(\frac{ij}{p}\right)+\sum_{i=-j}{\left(\frac{ij}{p}\right)}(p-1))\right)\](becuase $sum_{r=0}^{p-1}{\left( \frac{r^{2}-k^{2}}{p}\right)}=-1,(k\not =0),sum_{r=0}^{p-1}{\left( \frac{r^{2}-k^{2}}{p}\right)}=p-1,(k=0),$) I have no patience to continue at all,but the rest is easy.......
18.08.2018 07:57
Same approach as the above, but completed and with working display. In what follows, $\displaystyle\sum_i$ represents summing over all residue classes $i$ modulo $p$. Lemma: For a fixed $i$, $\displaystyle\sum_j \left( \dfrac{j(j+i)}{p} \right)$ is $-1$ if $i\not\equiv 0$ and $p-1$ otherwise. Proof: If $i\equiv 0$ the result is clear so assume otherwise. First we'll count the number of distinct pairs of QRs $u^2, v^2\neq 0$ with $u^2-v^2\equiv i$. This is equivalent with $i \equiv (u+v)(u-v) \iff u \equiv \dfrac{1}{2} \left( t + \dfrac{i}{t} \right), v \equiv \dfrac{1}{2} \left( t - \dfrac{i}{t} \right)$. Since $u,v\neq 0$ we must have $t\not\equiv \pm \sqrt{\pm i}$. Furthermore, switching $t\iff \frac{i}{t}$ and $t\iff -t$ yields the same pair of QRs $u^2, v^2$, so putting everything together, we have $\frac{p-1}{4}$ solutions if $\left( \frac{i}{p} \right)=-1$ and $\frac{p-5}{4}$ solutions otherwise, which we can express as $\dfrac{p-3}{4} - \dfrac{\left( \frac{i}{p} \right)}{2}$. Now we count the number of distinct pairs of non-QRs $x,y\not\equiv 0$ with $x-y\equiv i$. Multiply both sides by some non-QR $j$- then since $xj, yj$ are both QRs, this is equivalent now to $a^2-b^2\equiv ij$. By the previous paragraph, the number of distinct pairs $x,y$ is therefore $\dfrac{p-3}{4} - \dfrac{\left( \frac{ij}{p} \right)}{2} = \dfrac{p-3}{4} + \dfrac{\left( \frac{i}{p} \right)}{2}$. Now note that $\left( \dfrac{j(j+i)}{p} \right)$ is $0$ for two values of $j$ and $1$ if $j+i, j$ are either both nonzero QRs or non-QRs differing by $i$, and by the above there are a total of $\dfrac{p-3}{2}$ such $j$ for which this occurs, so the remaining $\dfrac{p-1}{2}$ values of $j$ yield a value of $-1$. Therefore the entire sum is $\dfrac{p-3}{2}-\dfrac{p-1}{2}=-1$ as desired. Now let $f(r) =\left( \displaystyle\sum_{i=1}^{p-1} \left( \dfrac{i(i^2-r)}{p} \right)\right)^2$. Clearly $f(0)=0$ and when $x\not\equiv 0$, we have $f(x^2r) =\left( \displaystyle\sum_{i=1}^{p-1} \left( \dfrac{i(i^2-x^2r)}{p} \right)\right)^2 = \left(\displaystyle\sum_{j=1}^{p-1} \left( \dfrac{jx((jx)^2-x^2r)}{p} \right)\right)^2 = \left(\displaystyle\sum_{j=1}^{p-1} \left( \dfrac{j(j^2-r)}{p} \right)\right)^2 \left( \dfrac{x^3}{p} \right)^2 = f(r)$, so $f$ is the same across all QRs and across all non-QRs. Now we expand $$\displaystyle\sum_j f(j) = \displaystyle\sum_j \displaystyle\sum_{u,v} \left( \dfrac{u(u^2-j)}{p} \right) \left( \dfrac{v(v^2-j)}{p} \right) = \displaystyle\sum_{u,v} \left( \dfrac{uv}{p} \right) \displaystyle\sum_j \left( \dfrac{(u^2-j)(v^2-j)}{p} \right) = \displaystyle\sum_{u^2-v^2=i} \left( \dfrac{uv}{p} \right) \displaystyle\sum_j \left( \dfrac{j(j+i)}{p} \right).$$ Clearly if $uv\equiv 0$ then the corresponding term does not contribute to the sum, so we may WLOG assume $u,v\not\equiv 0$. Then there are $2(p-1)$ pairs of residues $(u,v)$ modulo $p$ for which $u^2\equiv v^2$, in which case by the lemma applied on the inner summation with $i\equiv 0$ we get a total of $2(p-1)(p-1)$ from these terms. In the remaining pairs $(u,v)$, we know by the lemma applied on the inner summation with $i\not\equiv 0$ that the remaining terms sum to $$-\displaystyle\sum_{u\not\equiv 0} \displaystyle\sum_{v\not\equiv u,-u,0} \left( \dfrac{uv}{p} \right) = -\displaystyle\sum_{u\not\equiv 0} \left( -\left( \dfrac{u^2}{p} \right) - \left( \dfrac{-u^2}{p}\right) + \displaystyle\sum_v \left( \dfrac{uv}{p} \right)\right)= -\displaystyle\sum_{u\not\equiv 0} (-2) = 2(p-1),$$hence the original sum totals to $2p(p-1)$. Now since we know from earlier that $f(r)$ depends only on $\left( \frac{r}{p} \right)$, we have $a^2+b^2 = \dfrac{1}{4} \left( f(r) + f(s) \right) = \dfrac{1}{4} \dfrac{2p(p-1)}{\frac{p-1}{2}} = p$, so we are done.