Determine all triples $(p, q, r)$ of positive integers, where $p, q$ are also primes, such that $\frac{r^2-5q^2}{p^2-1}=2$.
Problem
Source: 2018 Centroamerican and Caribbean Math Olympiad
Tags: number theory, Centroamerican
Tintarn
25.06.2018 21:09
Squares modulo $8$...
$r,q$ clearly have the same parity. If they are both odd then $r^2-5q^2 \equiv 4 \mod 8$ and hence p^2-1 \equiv 2 \mod 4$ which is clearly impossible. So $q=2$ and $r=2k$ is even so that $2(k^2-5)=p^2-1$.
But then again $p$ is odd and hence $8 \mid p^2-1$ whence $4 \mid k^2-5$ and $k$ is odd. So $k^2-5 \equiv 4 \mod 8$ and $p^2-1 \equiv 8 \mod 16$. So $2$ is not a quadratic residue modulo $p$. But $2k^2 \equiv 9 \mod p$ which is a contradiction unless $p=3$.
So $p=3, q=2$ and $2(k^2-5)=8$ whence $k=3$ and $r=6$ which is indeed a solution.
Wizard_32
25.06.2018 21:24
Tintarn wrote:
Squares modulo $8$...
$r,q$ clearly have the same parity. If they are both odd then $r^2-5q^2 \equiv 4 \mod 8$ and hence $p^2-1 \equiv 2 \mod 4$ which is clearly impossible. So $q=2$ and $r=2k$ is even so that $2(k^2-5)=p^2-1$.
But then again $p$ is odd and hence $8 \mid p^2-1$ whence $4 \mid k^2-5$ and $k$ is odd. So $k^2-5 \equiv 4 \mod 8$ and $p^2-1 \equiv 8 \mod 16$. So $2$ is not a quadratic residue modulo $p$. But $2k^2 \equiv 9 \mod p$ which is a contradiction unless $p=3$.
So $p=3, q=2$ and $2(k^2-5)=8$ whence $k=3$ and $r=6$ which is indeed a solution.
There you go
jestrada
25.06.2018 21:26
$p=2$ implies $r^2-5q^2=6$ which fails mod $4$. Therefore $p$ is odd, $8|p^2-1$ and $16|r^2-5q^2$. Clearly $q, r$ have the same parity; if they're both odd then $r^2-5q^2\equiv4 (\mod 8)$, contradiction, so $q=2$ and we have $r^2-20=2p^2-2$, so $r^2\equiv 2p^2 (\mod 3)$. But this means $r,p\equiv 0 (\mod 3)$, so $p=3, r=6$. The only solution is $(3, 2, 6)$.
coquitao
27.06.2018 21:18
Yet another solution:
$p=3$ because if it weren't so, then
$$r^{2}+q^{2} \equiv 0 \pmod{3}.$$
This would allow us to infer that $q=3$ which would imply in turn that
$$r^{2} = 2p^{2}+43.$$
This is a equation that cannot have solutions in $\mathbb{Z}$ because it doesn't even hold modulo $8$.
Now then, the original eq. becomes
$$(r-4)(r+4)=5q^{2}.$$
If $q=2$, then $r=6$.
If $q=5$, then $r^{2}=141$.
Let us suppose now that $q>5$. Then $r-4$ is one of the six divisors of $5q^{2}$. Hence, $r-4=1$, $r-4=5$ or $r-4=q$. In the first case we obtain that $5q^{2}=9$, in the second case we get that $5q^{2}=65$, and in the last case we obtain that $q=2$ (because $r-4=q$ implies that $r+4=5q$).
From the exhaustive analysis above we conclude that $(p=3,q=2,r=6)$ is the only solution to the given problem.