Show that $p$ is a divisor of numbers $m^2 + 1$, $n^2 + 2$, if and only if it is a divisor of some number of the form $k^4 + 1$. Show that $p$ is a divisor of numbers  $m^2 + 1$, $n^2 + 2$, if and only if it is a divisor of some number of the form $k^4 + 1$.
Since $p \mid m^2 + 1$, we have $m^2 \cong -1( \mod p)$ and hence $\left ( \frac{-1}{p} \right)$ (Legendre Symbol) is $1$.
Again, $p \mid n^2 + 2$, we have $n^2 \cong -2( \mod p)$ and hence $\left ( \frac{-2}{p} \right)$ (Legendre Symbol) is $1$.
I am stuck here...How to proceed with the problem...Help Needed.
Thank You.
 A: Let $p$ divide some numbers of the form $m^2 + 1$ and $n^2 + 2$. Then both $-1$ and $-2$ are quadratic residues modulo $p$. This means that $p \equiv 1 \pmod 4$ and that $p \equiv 1,7 \pmod 8$. This means that $p$ is of the form $8s + 1$.
Now from the Euler's Criterion we have that an coprime number $a$ of $p$ is a biqaudratic residue iff $a^{\frac{p-1}{4}} \equiv 1 \pmod p$. For $-1$ we have that:
$$(-1)^{\frac{p-1}{4}} \equiv (-1)^{2s} \equiv 1 \pmod p$$
As $-1$ is a biquadratic residue modulo $p$ we have that there exists some $k$ s.t. $k^4 + 1$.
Then you should be able to easy revert back the proof for the other side.
A: We have in $\Bbb F_p$
$$x^2=-1\iff (-1)^{\frac{p-1}{2}}=1\Rightarrow p=4s+1\\x^2=-2\iff (-2)^{\frac{p-1}{2}}=1\Rightarrow p=8t\pm 1$$
Hence we must have $p=8k+1$ (the cases $p=8t-1$ must be discarded)
On the other hand $$(-1)^{\frac{p-1}{2}}=((-1)^{\frac{p-1}{4}})^2$$
This means, since $\frac{8t+1-1}{4}$ is a natural integer, that there exists $k\in\Bbb F_p$ such that $$k^4+1=0\iff k^4+1=Mp$$   
