TITLE: Sums of quadratic residues with quadratic nonresidues
QUESTION [6 upvotes]: For a given odd prime $p$ (with $p \mod 4 = 1$) I've being amusing myself to add any qr and any qnr. The result is sometimes a qr and sometimes a qnr, but what I found out is that exactly half of all the possible sums are qr and the other half are qnr. I've tried to write the qr as $a^{2i}$ (with $a$ a primitive root) and the qnr as $a^{2j+1}$, but $a^{2i} + a^{2j+1}$ leads nowhere, is it possible to prove this?

REPLY [3 votes]: Thanks to Andreas Caranti for the proof; his deleted argument contains most of this argument. I decided to finish the proof it for myself, and to avoid having to throw my work away I post it here. @Andreas: If you wish to undelete your answer and finish it, I'd be happy to remove this answer.

Let $F:=\Bbb{Z}/p\Bbb{Z}$ so that $F^{\times}$ is cyclic of order $p-1$. Let $A$ and $B$ denote the sets of quadratic residues and nonresidues, respectively, and fix some $t\in B$ so that
$$B=tA=\{ta:\ a\in A\}.$$
Let $a\in A$ and $b\in B$. There exist $x,y\in F^{\times}$ so that $a=x^2$ and $b=y^2t$, and $x$ and $y$ are determined by $a$ and $b$ up to sign. Let $c:=x^2+y^2t$. In the ring $E:=F[\sqrt{-t}]$ we can write this as
$$c=(x+y\sqrt{-t})(x-y\sqrt{-t}),$$
where $E\cong F[X]/(X^2+t)$ is a field of order $p^2$ because $X^2+t$ is irreducible as $-t$ is not a quadratic residue; we chose $t\in B$ and we have $-1\in A$ because $p\equiv1\pmod{4}$, so $-t\in B$.
In fact the identity above shows that $c$ is the norm of $x+y\sqrt{-t}\in E$, where the norm
$$\mathcal{N}:\ E^{\times}\ \longrightarrow\ F^{\times}:\ z\ \longmapsto\ z\cdot z^p,$$
is a group homomorphism. From $\sqrt{-t}^p=-\sqrt{-t}$ it follows that
\begin{align}
\mathcal{N}(x+y\sqrt{-t})
&=(x+y\sqrt{-t})(x+y\sqrt{-t})^p\\
&=(x+y\sqrt{-t})(x^p+y^p\sqrt{-t}^p)\\
&=(x+y\sqrt{-t})(x-y\sqrt{-t}),
\end{align}
which shows that $c=\mathcal{N}(x+\sqrt{-t})$. Note that the norm is surjective because
$$\ker\mathcal{N}=\{z\in E^{\times}:\ z^{p+1}=1\},$$
is a subgroup of order $p+1$ of the cyclic group $E^{\times}$ of order $p^2-1$, so the image of $\mathcal{N}$ is of order 
$$\frac{p^2-1}{p+1}=p-1=|F^{\times}|.$$
Now because $\mathcal{N}$ is a group homomorphism the elements of norm $c$ form a coset of the kernel of $\mathcal{N}$, so in particular for every $c\in F^{\times}$ the number of pairs $x,y\in F$ with $\mathcal{N}(x+y\sqrt{-t})=c$ is the same. It follows that the number of pairs $(a,b)\in A\times B$ with $a+b=c$ is the same for every $c$.
Do note that in every coset of $\ker\mathcal{N}$ in $E^{\times}$ there are precisely two elements that do not correspond to pairs in $A\times B$; these are the elements of the form $x+y\sqrt{-t}$ with $xy=0$, i.e. $x=0$ or $y=0$. Because there are precisely two such elements in every coset, the number of solutions to $a+b=c$ with $(a,b)\in A\times B$ is still the same for every $c\in F^{\times}$; there are $\frac{p-1}{4}$ pairs for every $c\in F^{\times}$.