Maths Olympiad Prep

Library / /38 of 106

Number theory Difficulty 8.2 Shortlist Find the answer

Find all triples (a,b,p)(a,b,p) of positive integers with pp prime and ap=b!+p. a^p=b!+p.

A number or a short expression. Spacing and $ signs are ignored.

Solution

We need to find all triples (a,b,p)(a, b, p) of positive integers such that pp is a prime number and satisfies the equation:
ap=b!+p. a^p = b! + p.

### Case Analysis

We will analyze the problem by considering small values of pp first and check if the equation holds for small factorials.

#### Case p=2p = 2
The equation becomes:
a2=b!+2. a^2 = b! + 2.
- For b=1b = 1: a2=1!+2=3a^2 = 1! + 2 = 3. This has no integer solution for aa.
- For b=2b = 2: a2=2!+2=4a^2 = 2! + 2 = 4. This gives a=2a = 2.
- For b3b \geq 3: b!+2b! + 2 grows quickly and is not a perfect square in most cases because b!+2>b2b! + 2 > b^2 for b3b \geq 3.

Thus, for p=2p = 2, the valid triple is (a,b,p)=(2,2,2)(a,b,p) = (2,2,2).

#### Case p=3p = 3
The equation becomes:
a3=b!+3. a^3 = b! + 3.
- For b=1b = 1: a3=1!+3=4a^3 = 1! + 3 = 4. This has no integer solution for aa.
- For b=2b = 2: a3=2!+3=5a^3 = 2! + 3 = 5. This has no integer solution for aa.
- For b=3b = 3: a3=3!+3=9a^3 = 3! + 3 = 9. This gives a=3a = 3.
- For b=4b = 4: a3=4!+3=27a^3 = 4! + 3 = 27. This gives a=3a = 3.
- For b5b \geq 5: b!+3b! + 3 becomes much larger, and checking values reveals that it is not a perfect cube.

Thus, for p=3p = 3, the valid triples are (a,b,p)=(3,3,3)(a,b,p) = (3,3,3) and (3,4,3)(3,4,3).

#### Case p5p \geq 5
For p5p \geq 5, we observe that b!+pb! + p becomes significantly large and less likely to correspond to a perfect power apa^p. Particularly, due to the rapid growth of factorial and the fact that a prime pp larger than 3 introduces a larger "gap" between powers, no small perfect powers exist.

The quick growth in factorials ensures that b!appb! \gg a^p - p for b5b \geq 5, making no perfect power solutions valid for bb this large.

### Conclusion

The only valid triples (a,b,p)(a, b, p) that satisfy the conditions are:
(2,2,2),(3,3,3),(3,4,3) \boxed{(2,2,2), (3,3,3), (3,4,3)}

Note: After calculation, we should discard (3,3,3)(3,3,3) due to incorrect factorial handling. Hence, keeping only (2,2,2)(2,2,2) and (3,4,3)(3,4,3) based on assessment of factorial growth.

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: Omni-MATH, licensed Apache-2.0. Statement and solution reproduced as published; topic and difficulty added by this site.