Prime dividing $4n^2+1$ congruent to $1\pmod{4}$ Prove that for any integer $n$, any prime $p$ such that $p\mid 4n^2+1$ is congruent to $1\pmod{4}$.
I am using this as a step to prove that there are infinitely many primes that are congruent to $1\pmod{4}$, but I want to prove this using this method.

Suppose that $p$ is a prime dividing $4n^2+1$.
Then, if we define $x=2n$:
$x^2 \equiv -1 \pmod{p}$
$\left(x^2\right)^{\frac{p-1}{2}} \equiv (-1)^{\frac{p-1}{2}} \pmod{p} $
$x^{p-1} \equiv (-1)^{\frac{p-1}{2}} \pmod{p}$
$(-1)^{\frac{p-1}{2}} \equiv 1 \pmod{p}\ $      by Fermat's theorem
$(-1)^{\frac{p-1}{2}} = 1$
And, so:   $\ p\equiv 1 \pmod{4}$
