Maths Olympiad Prep

Library / /96 of 520

Number theory Difficulty 5.7 AIME, harder Find the answer

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

A number or a short expression. Fractions can be typed as 3/2, and spacing doesn't matter.

Solution

The condition is symmetric so we can assume that ba b \leq a .

The first case is when a=b a = b . In this case, a!+a=5m a! + a = 5^m for some positive integer m m . We can rewrite this as a((a1)!+1)=5m a \cdot ((a-1)! + 1) = 5^m . This means that a=5k a = 5^k for some integer k0 k \geq 0 . It is clear that k k cannot be 0. If k2 k \geq 2 , then (a1)!+1=5l (a-1)! + 1 = 5^l for some l1 l \geq 1 , but a1=5k1>5 a-1 = 5^k - 1 > 5 , so 5(a1)! 5 \mid (a-1)! , which is not possible because 5(a1)!+1 5 \mid (a-1)! + 1 . This means that k=1 k = 1 and a=5 a = 5 . In this case, 5!+5=125 5! + 5 = 125 , which gives us the solution (5,5) (5,5) .

Let us now assume that 1b<a 1 \leq b < a . We have a!+b=5x a! + b = 5^x and b!+a=5y b! + a = 5^y . Since b<a b < a , b!+a<a!+a b! + a < a! + a , so 5y<5x 5^y < 5^x , which implies y<x y < x . If x2 x \geq 2 , then 5a! 5 \mid a! . However, 55y=a!+1 5 \mid 5^y = a! + 1 , which leads to a contradiction. We conclude that x=1 x = 1 and a=4 a = 4 . From here a!+b=25 a! + b = 25 and b!+a=5 b! + 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<a 1 < b < a . Because b5x b \mid 5^x and b>1 b > 1 , we have b=5z b = 5^z for z1 z \geq 1 . If z2 z \geq 2 , then 5b=5 5b = 5 , which gives us a10 a \geq 10 . However, this would mean that 25a! 25 \mid a! , 5b 5 \mid b and 25b 25 \nmid b , which is not possible, because a!+b=5x a! + b = 5^x and 255x 25 \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,000 problems in a working order, from AMC 10 level to the IMO shortlist.

Source: NuminaMath-1.5, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.