Difference between revisions of "2022 USAMO Problems/Problem 4"

(Created page with "==Solution== Since <math>q(p-1)</math> is a perfect square and <math>q</math> is prime, we should have <math>p - 1 = qb^2</math> for some positive integer <math>b</math>. Let...")
 
(Solution)
Line 1: Line 1:
 +
==Problem==
 +
 
==Solution==
 
==Solution==
  
Line 13: Line 15:
  
 
Thus, the only solution is <math>(p, q) = (3, 2)</math>.
 
Thus, the only solution is <math>(p, q) = (3, 2)</math>.
 +
 +
==See also==
 +
{{USAMO newbox|year=2022|num-b=5|after=Last Problem}}
 +
{{MAA Notice}}

Revision as of 19:28, 31 March 2022

Problem

Solution

Since $q(p-1)$ is a perfect square and $q$ is prime, we should have $p - 1 = qb^2$ for some positive integer $b$. Let $a^2 = p - q$. Therefore, $q = p - a^2$, and substituting that into the $p - 1 = qb^2$ and solving for $p$ gives \[p = \frac{a^2b^2 - 1}{b^2 - 1} = \frac{(ab - 1)(ab + 1)}{b^2 - 1}.\] Notice that we also have \[p = \frac{a^2b^2 - 1}{b^2 - 1} = a^2 + \frac{a^2 - 1}{b^2 - 1}\] and so $b^2 - 1 | a^2 - 1$. We run through the cases

  • $a = 1$: Then $p - q = 1$ so $(p, q) = (3, 2)$, which works.
  • $a = b$: This means $p = a^2 + 1$, so $q = 1$, a contradiction.
  • $a > b$: This means that $b^2 - 1 < ab - 1$. Since $b^2 - 1$ can be split up into two factors $F_1, F_2$ such that $F_1 | ab - 1$ and $F_2 | ab + 1$, we get

\[p = \frac{ab - 1}{F_1} \cdot \frac{ab + 1}{F_2}\] and each factor is greater than $1$, contradicting the primality of $p$.

Thus, the only solution is $(p, q) = (3, 2)$.

See also

2022 USAMO (ProblemsResources)
Preceded by
Problem 5
Followed by
Last Problem
1 2 3 4 5 6
All USAMO Problems and Solutions

The problems on this page are copyrighted by the Mathematical Association of America's American Mathematics Competitions. AMC logo.png