Maths Olympiad Prep

Library / Romanian Mathematical Olympiad /219 of 275

Romanian Mathematical Olympiad

Number theory Difficulty 6.4 National Olympiad Prove it Romania

Determine the four-digit natural numbers abcd‾\overline{abcd}, for which there exists a prime number pp, such that cd‾−ab‾=p+2\overline{cd} - \overline{ab} = p + 2 and ab‾−4+cd‾=p2\sqrt{\overline{ab} - 4} + \sqrt{\overline{cd}} = p^2.

Solution

Since ab‾−4+cd‾<10+10=20\sqrt{\overline{ab} - 4} + \sqrt{\overline{cd}} < 10 + 10 = 20, we obtain p=2p = 2 or p=3p = 3.
If p=2p = 2, then cd‾=ab‾+4\overline{cd} = \overline{ab} + 4 and ab‾−4+ab‾+4=4\sqrt{\overline{ab} - 4} + \sqrt{\overline{ab} + 4} = 4, therefore ab‾=5\overline{ab} = 5, false.
If p=3p = 3, then cd‾=ab‾+5\overline{cd} = \overline{ab} + 5 and ab‾−4+ab‾+5=9\sqrt{\overline{ab} - 4} + \sqrt{\overline{ab} + 5} = 9. We obtain the unique solution ab‾=20\overline{ab} = 20, thus abcd‾=2025\overline{abcd} = 2025.

Alternative solution:
Since ab‾−4\overline{ab}-4, cd‾\overline{cd} and ab‾−4+cd‾\sqrt{\overline{ab}-4}+\sqrt{\overline{cd}} are integers, the natural numbers k,nk, n exist, such that ab‾−4=k2\overline{ab}-4 = k^2 and cd‾=n2\overline{cd} = n^2, hence k+n=p2k+n = p^2. (1)
We obtain p+6=cd‾−ab‾+4=n2−k2=(n−k)(n+k)p+6 = \overline{cd} - \overline{ab} + 4 = n^2 - k^2 = (n-k)(n+k). Using (1), we deduce that p+6=(n−k)⋅p2p+6 = (n-k) \cdot p^2, therefore p∣(p+6)p \mid (p+6), so p∈{2,3}p \in \{2, 3\}.
If p=2p = 2, we obtain k=1k = 1 and n=3n = 3, therefore ab‾=5\overline{ab} = 5, which is false. If p=3p = 3, we obtain k=4k = 4 and n=5n = 5, so ab‾=20\overline{ab} = 20 and cd‾=25\overline{cd} = 25, which satisfies the hypothesis. Therefore, the solution is 2025.

Want a route through all this instead of an archive? The track puts 2,604 problems in a working order, from Junior Challenge level to the IMO shortlist.

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