Find all the positive integers p,q,n such that p,q are primes and also $$(p^2 + 1)(q^2 + 1) = n^2 + 1$$.
We know that pair squares are all divisible by 4 (because they have two or more times 2 as factor), so I squared the possible residues of 4. $$(4k)^2 = 16k^2 = 4k$$ $$(4k+1)^2 = 16k^2 + 8k + 1 = 4k+1$$ $$(4k+2)^2 = 16k^2 + 16k + 4 = 4k$$ $$(4k+3)^2 = 16k^2 + 24k + 9 = 4k+1$$
So, every squared odd number has residue 1 when it's divided by 4. We can notice that $n^2 + 1$ has residue 1 or 2. Let's suposse $p$ and $q$ are both odd numbers, then $ (p^2 + 1)(q^2 + 1) $ Has to be divisible by 4 (because both factors let residue 2), and that doesn't make sense. So, $p$ or $q$ (it doesn't matter) has to be pair, an the only pair prime is 2. Then we have $$5(q^2 +1) = n^2 + 1$$
I found $$5(3^2 + 1) = 7^2 + 1$$ but i don't know if they're the only 3 numbers. So i'm wondering to know how to prove that they're, and if they aren't wich are the others (and again, how to prove that they're the only) using the method i did or another (but not that complicated)
Thanks.