
3. Find all primes $p$ and $q$ such that $p$ divides $q^{2}-4$ and $q$ divides $p^{2}-1$.


Solution. Suppose that $p \leq q$. Since $q$ divides $(p-1)(p+1)$ and $q>p-1$ it follows that $q$ divides $p+1$ and hence $q=p+1$. Therefore $p=2$ and $q=3$.

On the other hand, if $p>q$ then $p$ divides $(q-2)(q+2)$ implies that $p$ divides $q+2$ or $q-2=0$. This gives either $p=q+2$ or $q=2$. In the former case it follows that that $q$ divides $(q+2)^{2}-1$, so $q$ divides 3. This gives the solutions $p>2, q=2$ and $(p, q)=(5,3)$.
