Maths Olympiad Prep

Track / Stage 6 / 306 of 400 #1946 of 2604

Problem 1946

National Olympiad, first round
Number theory Difficulty 6.6 Prove it Bulgaria competition problems · Bulgaria · 2022

Determine all prime numbers pp, for which there exist positive integers xx and yy, such that
∣p+49=2x2p2+49=2y2. \left| \begin{array}{l} p + 49 = 2x^2 \\ p^2 + 49 = 2y^2 \end{array} \right. .

This one wants a proof. Work it on paper, then read the official solution and mark yourself. Be honest about it: the record is only any use to you if it is.

Next problem →

Official solution

We will prove that p=23p = 23 is the unique solution. Subtracting the second equality from the first one, we get p(p−1)=2(y−x)(y+x)p(p-1) = 2(y-x)(y+x). From the first equality pp is odd, thus p≠2p \ne 2 and p∣(y−x)(y+x)p \mid (y-x)(y+x). Clearly y>xy > x, so assuming p∣(y−x)p \mid (y-x), we get p≤y−x<y+xp \le y-x < y+x. Therefore,
2(y−x)(y+x)>2p2>p2>p(p−1) - a contradiction.  ⟹  p∣(y+x). 2(y-x)(y+x) > 2p^2 > p^2 > p(p-1) \text{ - a contradiction.} \quad \implies \quad p \mid (y+x).

Assuming y≥py \ge p, from the second equation it follows 49=2y2−p2≥p249 = 2y^2 - p^2 \ge p^2, i.e., p≤7p \le 7. Since 26=3+49226 = \frac{3+49}{2}, 27=5+49227 = \frac{5+49}{2}, 28=7+49228 = \frac{7+49}{2} are not perfect squares, none of those values is a solution. For the remaining case y<py < p, we have x+y<2y<2px+y < 2y < 2p, thus x+y=px+y = p. So y−x=p−2xy-x = p-2x and
p−1=2(y−x)=2(p−2x)⇔p=4x−1⇔2x2−4x−48=0⇔x1,2=1±5. p-1 = 2(y-x) = 2(p-2x) \Leftrightarrow p = 4x-1 \Leftrightarrow 2x^2 - 4x - 48 = 0 \Leftrightarrow x_{1,2} = 1 \pm 5.

Finally, since −4<0-4 < 0, the only solution is x=6x = 6, p=4⋅6−1=23p = 4 \cdot 6 - 1 = 23 and y=p−x=17y = p - x = 17. Direct check confirms that this is indeed a solution.

Source: MathNet, licensed CC-BY-4.0. Statement reproduced verbatim; metadata (topic, difficulty, ordering) added by this project.