Does $p=x^2+4y^2$ imply that $x$ is a quadratic residue mod $p$?
I'm stuck on this problem. My attempt:
We know that since $p$ is a sum of squares $p\equiv 1 (4)$. This means that $\left(\frac{-1}{p}\right)=1$. Hence we have $$ x^2\equiv -4y^2\equiv (k2y)^2 (p) $$ for some $k$ with $k^2\equiv-1(p)$. And hence $$ x\equiv \pm (k2y) (p) $$ So we can write $$ \left(\frac{x}{p}\right)=\left(\frac{k}{p}\right)\left(\frac{2}{p}\right)\left(\frac{y}{p}\right) $$ And since $$ \left(\frac{2}{p}\right)=\left(\frac{k}{p}\right)=\begin{cases} 1&\text{ if }p\equiv 1(8)\\ -1&\text{ if }p\equiv 5(8)\\ \end{cases} $$ We can reduce to $$ \left(\frac{x}{p}\right)=\left(\frac{y}{p}\right) $$ i.e. either both $x$ and $y$ are quadratic residues or neither is. Which might be interesting or it might not be; I'm stuck here.
Any input would be appreciated, either telling me where to go from here, or using completely different arguments.
You already proved that $p=x^2+4y^2$ implies $p\equiv 1\pmod{4}$.
Then, by quadratic reciprocity: $$ \left(\frac{x}{p}\right)=\left(\frac{x}{x^2+4y^2}\right)=\left(\frac{x^2+4y^2}{x}\right)=\left(\frac{4y^2}{x}\right) = 1 $$ since $4y^2 = (2y)^2$.