Maths Olympiad Prep

Library / Balkan Mathematical Olympiad /1 of 6

Balkan Mathematical Olympiad

Number theory Difficulty 5.7 AIME, harder Prove it JBMO

Problem:
Find all pairs (a,b)(a, b) of positive integers such that a!+ba!+b and b!+ab!+a are both powers of 55.

Solution

Solution:
The condition is symmetric so we can assume that b≤ab \leq a.

The first case is when a=ba = b. In this case, a!+a=5ma! + a = 5^{m} for some positive integer mm. We can rewrite this as a⋅((a−1)!+1)=5ma \cdot ((a-1)! + 1) = 5^{m}. This means that a=5ka = 5^{k} for some integer k≥0k \geq 0. It is clear that kk cannot be 00. If k≥2k \geq 2, then (a−1)!+1=5l(a-1)! + 1 = 5^{l} for some l≥1l \geq 1, but a−1=5k−1>5a-1 = 5^{k} - 1 > 5, so 5∣(a−1)!5 \mid (a-1)!. However, 5∣(a−1)!+15 \mid (a-1)! + 1, which is not possible. This means that k=1k = 1 and a=5a = 5. In this case, 5!+5=1255! + 5 = 125, which gives us the solution (5,5)(5,5).

Let us now assume that 1≤b<a1 \leq b < a. Let us first assume that b=1b = 1. Then a+1=5xa + 1 = 5^{x} and a!+1=5ya! + 1 = 5^{y} for integers x,y≥1x, y \geq 1. If x≥2x \geq 2, then a=5x−1≥52−1>5a = 5^{x} - 1 \geq 5^{2} - 1 > 5, so 5∣a!5 \mid a!. However, 5∣5y=a!+15 \mid 5^{y} = a! + 1, which leads to a contradiction. We conclude that x=1x = 1 and a=4a = 4. From here a!+b=25a! + b = 25 and b!+a=5b! + a = 5, so we get two more solutions: (1,4)(1,4) and (4,1)(4,1).

Now we focus on the case 1<b<a1 < b < a. Then we have a!+b=5xa! + b = 5^{x} for x≥2x \geq 2, so b⋅(a!b+1)=5xb \cdot \left(\frac{a!}{b} + 1\right) = 5^{x}, where b∣a!b \mid a! because a>ba > b. Because b∣5xb \mid 5^{x} and b>1b > 1, we have b=5zb = 5^{z} for z≥1z \geq 1. If z≥2z \geq 2, then 5<b<a5 < b < a, so 5∣a!5 \mid a!, which means that a!b+1\frac{a!}{b} + 1 cannot be a power of 55. We conclude that z=1z = 1 and b=5b = 5. From here 5!+a5! + a is a power of 55, so 5∣a5 \mid a, but a>b=5a > b = 5, which gives us a≥10a \geq 10. However, this would mean that 25∣a!25 \mid a!, 5∣b5 \mid b and 25∤b25 \nmid b, which is not possible, because a!+b=5xa! + b = 5^{x} and 25∣5x25 \mid 5^{x}.

We conclude that the only solutions are (1,4)(1,4), (4,1)(4,1) and (5,5)(5,5).

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.