Find all prime numbers $p$ and $q$ such that $p^2|q^3+1$ and $q^2|p^6-1$
Problem
Source: Hong Kong TST3 P1
Tags: number theory, prime numbers
24.04.2016 14:40
Let $p,q>3$ so $p^2|(q+1)\cdot (q^2+1-q)$ 1.case:$p|q+1$ then $q\equiv -1 (mod p)$ now $p$ doesn't divides $q^2+1-q$ because $q^2+1-q\equiv 3(mod p)$.Now let $q=p^{2}k-1$,similary we conclude $q^{2}|p^2+1+p$,or $q^{2}|p^2+1-p$ or $q^{2}|p+1$ or $q^2|p-1$ but from $q=p^{2}k-1$ and $p,q>3$ we don't have solutions 2.case:$p|q^{2}+1-q$,now $p$ doesn't divides $q+1$ so $p^2|q^2+1-q$ so we obtain $q>p$ again we conclude $q^{2}|p^2+1+p$,or $q^{2}|p^2+1-p$ or $q^{2}|p+1$ or $q^2|p-1$,trivialy we only need to check $q^2|p^2+1+p$,because $q>p$ we have $q^2=p^2+1+p$ and $p^2=q^2+1-q$, from which don't have solutions. Now let:$p=2$ we have $4|q^3+1$ and $q^2|63$ so $q=3$ $p=3$ we have $9|q^3+1$ and $q^2|728$ so $q=2$ $q=2$ we have $p^2|9$ so $p=3$ $q=3$ we have $p^2|28$ so $p=2$ Solutions:$(p,q)\in (2,3),(3,2)$
24.04.2016 17:30
Hello. This also appeared in Bulgaria 2014 TST,Day 2,Problem 1.
26.05.2016 08:44
Just come up with the old conclusion again.But actually it is classic.