Difference between revisions of "2022 USAJMO Problems/Problem 5"

(Solution 1)
(Solution 1)
Line 3: Line 3:
  
 
==Solution 1==
 
==Solution 1==
We first consider the case where one of <math>p,q</math> is even. If <math>p</math> equals 2, <math>p-q=0</math> and <math>pq-q=2</math> which doesn't satisfy the problem restraints. If <math>q=2</math>, we can set <math>p-2=x^2</math> and <math>2p-2=y^2</math> giving us <math>p=y^2-x^2=(y+x)(y-x)</math>. This forces <math>y-x=1</math> so <math>p=2x+1</math> and <math>p=x^2+2</math>. We then have <math>2x+1=x^2+2 \rightarrow x=1 \rightarrow (p,q)=(3,2)</math>.
+
We first consider the case where one of <math>p,q</math> is even. If <math>p</math> equals 2, <math>p-q=0</math> and <math>pq-q=2</math> which doesn't satisfy the problem restraints. If <math>q=2</math>, we can set <math>p-2=x^2</math> and <math>2p-2=y^2</math> giving us <math>p=y^2-x^2=(y+x)(y-x)</math>. This forces <math>y-x=1</math> so <math>p=2x+1\rightarrow 2x+1=x^2+2 \rightarrow x=1 \rightarrow (p,q)=(3,2)</math>.
  
  

Revision as of 13:18, 3 August 2023

Problem

Find all pairs of primes $(p,q)$ for which $p-q$ and $pq-q$ are both perfect squares.

Solution 1

We first consider the case where one of $p,q$ is even. If $p$ equals 2, $p-q=0$ and $pq-q=2$ which doesn't satisfy the problem restraints. If $q=2$, we can set $p-2=x^2$ and $2p-2=y^2$ giving us $p=y^2-x^2=(y+x)(y-x)$. This forces $y-x=1$ so $p=2x+1\rightarrow 2x+1=x^2+2 \rightarrow x=1 \rightarrow (p,q)=(3,2)$.


Now assume that $p,q$ are both odd primes. Set $p-q=x^2$ and $pq-q=y^2$ so $(pq-q)-(p-q)=y^2-x^2 \rightarrow p(q-1)=(y+x)(y-x)$. Since $y+x>y-x$, $p | (x+y)$. Note that $q-1$ is an even integer and since $y+x$ and $y-x$ have the same parity, they both must be even. Therefore, $x+y=pk$ for some positive even integer $k$. On the other hand, $p>p-q=x^2 \rightarrow p>x$ and $p^2-p>pq-q=y^2 \rightarrow p>y$. Therefore, $2p>x+y$ so $x+y=p$, giving us a contradiction.


Therefore, the only solution to this problem is $(p,q)=(3,2)$.


~BennettHuang