Show that if $p$ is a prime number satisfying $p\equiv 1\mod 4$, $a$ is an odd positive number, and there exists $b$ such that $a^2+b^2=p$, then $a$ is a quadratic residue $\mod p$.
I know that Fermat's theorem on sums of two squares tells us that $a^2+b^2=p$ iff $p\equiv 1\mod 4$. Also I believe a form of Wilson's Theorem could be used here, although I'm not sure how.
Let $a=p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k}$, where $p_i$ are odd, since $a$ is odd.
$b^2\equiv p\pmod{p_i}$, so $\left(\frac{p}{p_i}\right)=1$.
$\left(\frac{p}{p_i}\right)=\left(\frac{p_i}{p}\right)=1$ by Quadratic Reciprocity, since $p\equiv 1\pmod{4}$.
$\left(\frac{a}{p}\right)=\left(\frac{p_1}{p}\right)^{a_1}\left(\frac{p_2}{p}\right)^{a_2}\cdots \left(\frac{p_k}{p}\right)^{a_k}=1\cdot 1\cdots 1=1$.