Determine all pairs of prime numbers $(p, q)$ which satisfy the equation \[ p^3+q^3+1=p^2q^2 \]
Problem
Source: Cyprus 2022 Junior TST-2 Problem 2
Tags: number theory, primes, prime numbers
21.02.2022 15:51
Without loss of generality assume that $p \geq q$. If $p=q$ then $2p^3+1=p^4$, but $1=p^3(p-2) \geq p^3>1,$ absurd. Now let $p>q$. If $q=3$, then $p^3+28=9p^2$, i.e. $(p-2)(p^2-7p-14)=0$, so $p=2$, absurd. If now $q \neq 3$, then taking $\pmod p^2$ we obtain $p^2 \mid (q^3+1)=(q+1)(q^2-q+1)$. If $p \mid (q+1)$ and $p \mid (q^2-q+1)$, then $q \equiv -1 \pmod p$, so $0 \equiv q^2-q+1 \equiv 3 \pmod p,$ implying that $p=3$, and since $p>q$, we must have $p=3,q=2$, which works. Furthermore, if $p \mid (q+1)$ we then must have $p=q+1$ (since $p \leq q+1 \leq p$), and therefore $p=3,q=2$. Thus, if $p \neq 3$, we have $p \nmid (q+1)$, hence $p^2 \mid (q^2-q+1)$, implying $p^2 \leq q^2-q+1 <q^2<p^2,$ which is impossible. To sum up, the only solution is $(p,q)=(3,2)$.
21.02.2022 16:53
We claim that $\boxed {(p,q)=(3,2)}$ is the only solution. WLOG $p \ge q$, If $p=q$ $2p^3+1=p^4 \Rightarrow p^3(p-2)=1$ which is not possible. Hence, $p >q$ Now, $q^3+1 \equiv 0 \pmod{p} \Rightarrow q^6 \equiv 1 \pmod{p}$ So, $\operatorname{ord}_p(q)=1,2,3,6$ Case 1:-$\operatorname{ord}_p(q)=1$ We have $p \mid {q-1}$ and therefore $q=pk+1$ for some k $$p^3+(pk+1)^3+1=p^2q^2 \Rightarrow 2 \equiv 0 \pmod{p}$$which implies $p=2$ but that's not possible as $p>q$ Case 2:-If $\operatorname{ord}_p(q)=3$ $$p \mid {q^3-1} \Rightarrow p \mid {q^3+1 -2} \Rightarrow p \mid 2$$which is again not possible. Case 3:-If $\operatorname{ord}_p(q)=2$ $$p \mid {q^2-1} \Rightarrow p \mid (q+1)(q-1)$$$p$ can't divide both because it will again give $p=2$ So $p \mid q+1$ or $p \mid q-1$ If $p \mid q+1$ then $p \le q+1 \le p \Rightarrow p=q+1$ which yields $(p,q)=(3,2)$ as solution. If $p \mid q-1 \Rightarrow p \le q-1 <q $ which is a contradiction. Case 4:- $\operatorname{ord}_p(q)=6$ $$p \mid q^6-1 \Rightarrow p \mid (q^3+1)(q^3-1) \Rightarrow p \nmid q^3-1$$and the rest of the solution follows #2
21.02.2022 17:11
https://artofproblemsolving.com/community/c6h1692992p23055351
22.02.2022 18:32
A faster way (essentially optimized version of 2nd post). Let $p=q$. Inspecting both sides modulo $p$, we find $p\mid 1$, which is absurd. Thus $p\ne q$. Let $p>q$ wlog. Inspecting both sides modulo $p^2$, we find that \[ p^2\mid (q+1)(q^2-q+1). \]Now, let $p\mid q+1$. Then, as $p\ge q+1$, we must have $p=q+1$, which holds iff $(p,q)=(3,2)$. Assume $p\nmid q+1$. We then have $p^2\mid q^2-q+1$, in particular $p^2\le q^2-q+1<q^2$. As $p>q$ this is a contradiction.
01.04.2022 19:24
$p^3 + q^3 + 1 \mid p^2q^2 \implies p^2 \mid q^3 + 1 \implies p^2 \mid (q+1)(q^2-q+1)$. Case $1$ : $p \mid q+1 , p \mid q^2 - q + 1$. $p \mid q+1 \implies p \mid q^2 + q \implies p \mid 2q-1 \implies p \mid q-2 \implies p \mid 3 \implies p = 3 \implies q = 2$. Case $2$ : $p \nmid q+1 , p^2 \mid q^2 - q + 1$. $p^2 \le q^2 - q + 1 < q^2 < p^2$ so gives contradiction. Case $3$ : $p^2 \mid q+1 , p \nmid q^2 - q + 1$. $p^2 \le q+1 < p+1 < p^2$ so gives contradiction. Answers : $(p,q) = (3,2)$.
02.04.2022 14:16
ISL 2019 N2 ($c=1$ and $a,b\to$ prime)
02.04.2022 23:17
Demetres wrote: Determine all pairs of prime numbers $(p, q)$ which satisfy the equation \[ p^3+q^3+1=p^2q^2 \] Cute One. My idea is also same Posting it anyways. If $p=q$ then $p^4=2p^3+1\implies p^3|1$ which is contradiction as $p$ is prime. WLOG $q>p$ then $q^2|q^3\implies q^2|p^3+1\implies q^2|(p+1)(p^2-p+1)$ Now if $q|p+1\implies q=p+1$ But there is only one set of $2$ consecutive primes which is $(2,3)$ putting $p=2,q=3$ we get it indeed satisfies. Now $q\nmid p+1\implies q^2|p^2-p+1$ as $q>p+1$ in this case So $(p+1)^2<p^2-p+1\implies 3p+2<0$ which is absurd So there's only one Solution $(p,q)=(2,3)$