This is a homework problem that I cannot figure out. I have figured out that if $n^2 + 1$ is a perfect square it can be written as such:
$n^2 + 1 = k^2$.
and if $n$ is even it can be written as such:
$n = 2m$
I believe I'm supposed to use the fact that if $n \pmod{4} \equiv 0$ or $1$ then it's a perfect square (maybe that's wrong).
I cannot figure this out.
You have the useful fact backwards. It’s not true that if $n$ is congruent to $0$ or $1$ mod $4$, then $n$ is a perfect square: $5\equiv1\pmod4$, and $8\equiv0\pmod4$, but neither $5$ nor $8$ is a perfect square. What is true is that if $n$ is a perfect square, then $n\equiv0\pmod 4$ or $n\equiv1\pmod 4$. To prove this, just show that the square of an even number is always congruent to $0$ mod $4$, and the square of an odd number is always congruent to $1$ mod $4$.
Thus, if $n^2+1$ is a perfect square, it must be congruent to $0$ or $1$ mod $4$. So must $n^2$. The only possibility, then, is that $n^2\equiv0\pmod4$ and $n^2+1\equiv1\pmod4$. But then $n^2$ is even, so ... ?