Maths Olympiad Prep

Track / Stage 8 / 107 of 180 #2447 of 2604

Problem 2447

IMO Shortlist mid-range; USAMO P2/P5
Number theory Difficulty 8.5 Prove it International Mathematical Olympiad · IMO

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

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

Solution 1. Clearly, a>1a > 1. We consider three cases.

Case 1: We have a<pa < p. Then we either have a⩽ba \leqslant b which implies a∣ap−b!=pa \mid a^{p} - b! = p leading to a contradiction, or a>ba > b which is also impossible since in this case we have b!⩽a!<ap−pb! \leqslant a! < a^{p} - p, where the last inequality is true for any p>a>1p > a > 1.

Case 2: We have a>pa > p. In this case b!=ap−p>pp−p⩾p!b! = a^{p} - p > p^{p} - p \geqslant p! so b>pb > p which means that ap=b!+pa^{p} = b! + p is divisible by pp. Hence, aa is divisible by pp and b!=ap−pb! = a^{p} - p is not divisible by p2p^{2}. This means that b<2pb < 2p. If a<p2a < p^{2} then a/p<pa / p < p divides both apa^{p} and b!b! and hence it also divides p=ap−b!p = a^{p} - b! which is impossible. On the other hand, the case a⩾p2a \geqslant p^{2} is also impossible since then ap⩾(p2)p>(2p−1)!+p⩾b!+pa^{p} \geqslant (p^{2})^{p} > (2p-1)! + p \geqslant b! + p.

Comment. The inequality p2p>(2p−1)!+pp^{2p} > (2p-1)! + p can be shown e.g. by using
(2p−1)!=[1⋅(2p−1)]⋅[2⋅(2p−2)]⋯[(p−1)(p+1)]⋅p<((2p2)2)p−1⋅p=p2p−1 (2p-1)! = [1 \cdot (2p-1)] \cdot [2 \cdot (2p-2)] \cdots [(p-1)(p+1)] \cdot p < \left(\left(\frac{2p}{2}\right)^{2}\right)^{p-1} \cdot p = p^{2p-1}
where the inequality comes from applying AM-GM to each of the terms in square brackets.

Case 3: We have a=pa = p. In this case b!=pp−pb! = p^{p} - p. One can check that the values p=2,3p = 2, 3 lead to the claimed solutions and p=5p = 5 does not lead to a solution. So we now assume that p⩾7p \geqslant 7. We have b!=pp−p>p!b! = p^{p} - p > p! and so b⩾p+1b \geqslant p + 1 which implies that
v2((p+1)!)⩽v2(b!)=v2(pp−1−1)=LTE2v2(p−1)+v2(p+1)−1=v2(p−12⋅(p−1)⋅(p+1)), v_{2}((p+1)!) \leqslant v_{2}(b!) = v_{2}\left(p^{p-1} - 1\right) \stackrel{LTE}{=} 2 v_{2}(p-1) + v_{2}(p+1) - 1 = v_{2}\left(\frac{p-1}{2} \cdot (p-1) \cdot (p+1)\right),
where in the middle we used lifting-the-exponent lemma. On the RHS we have three factors of (p+1)!(p+1)!. But, due to p+1⩾8p+1 \geqslant 8, there are at least 4 even numbers among 1,2,…,p+11, 2, \ldots, p+1, so this case is not possible.

Solution 2. The cases a≠pa \neq p are covered as in solution 1, as are p=2,3p = 2, 3. For p⩾5p \geqslant 5 we have b!=p(pp−1−1)b! = p(p^{p-1} - 1). By Zsigmondy's Theorem there exists some prime qq that divides pp−1−1p^{p-1} - 1 but does not divide pk−1p^{k} - 1 for k<p−1k < p-1. It follows that ord⁡q(p)=p−1\operatorname{ord}_{q}(p) = p-1, and hence q≡1 mod (p−1)q \equiv 1 \bmod (p-1). Note that p≠qp \neq q. But then we must have q⩾2p−1q \geqslant 2p-1, giving
b!⩾(2p−1)!=[1⋅(2p−1)]⋅[2⋅(2p−2)]⋯[(p−1)⋅(p+1)]⋅p>(2p−1)p−1p>pp>pp−p, b! \geqslant (2p-1)! = [1 \cdot (2p-1)] \cdot [2 \cdot (2p-2)] \cdots [(p-1) \cdot (p+1)] \cdot p > (2p-1)^{p-1} p > p^{p} > p^{p} - p,
a contradiction.

Solution 3. The cases a≠pa \neq p are covered as in solution 1, as are p=2,3p = 2, 3. Also b>pb > p, as pp>p!+pp^{p} > p! + p for p>2p > 2. The cases p=5,7,11p = 5, 7, 11 are also checked manually, so assume p⩾13p \geqslant 13. Let q∣p+1q \mid p+1 be an odd prime. By LTE
vq(pp−p)=vq((p2)p−12−1)=vq(p2−1)+vq(p−12)=vq(p+1) v_{q}\left(p^{p} - p\right) = v_{q}\left(\left(p^{2}\right)^{\frac{p-1}{2}} - 1\right) = v_{q}\left(p^{2} - 1\right) + v_{q}\left(\frac{p-1}{2}\right) = v_{q}(p+1)
But b⩾p+1b \geqslant p+1, so then vq(b!)>vq(p+1)v_{q}(b!) > v_{q}(p+1), since q<p+1q < p+1, a contradiction. This means that p+1p+1 has no odd prime divisor, i.e. p+1=2kp+1 = 2^{k} for some kk.

Now let q∣p−1q \mid p-1 be an odd prime. By LTE
vq(pp−p)=2vq(p−1) v_{q}\left(p^{p} - p\right) = 2 v_{q}(p-1)
Let d=vq(p−1)d = v_{q}(p-1). Then p⩾1+qdp \geqslant 1 + q^{d}, so
vq(b!)⩾vq(p!)⩾vq(qd!)>qd−1⩾2d v_{q}(b!) \geqslant v_{q}(p!) \geqslant v_{q}\left(q^{d}!\right) > q^{d-1} \geqslant 2d
provided d⩾2d \geqslant 2 and q>3q > 3, or d⩾3d \geqslant 3.
If q=3,d=2q = 3, d = 2 and p⩾13p \geqslant 13 then vq(b!)⩾vq(p!)⩾vq(13!)=5>2dv_{q}(b!) \geqslant v_{q}(p!) \geqslant v_{q}(13!) = 5 > 2d. Either way, d⩽1d \leqslant 1.
If p>2q+1p > 2q + 1 (so p>3qp > 3q, as q∣p−1q \mid p-1) then
vq(b!)⩾vq((3q)!)=3 v_{q}(b!) \geqslant v_{q}((3q)!) = 3
so we must have q⩾p2q \geqslant \frac{p}{2}, in other words, p−1=2qp-1 = 2q. This implies that p=2k−1p = 2^{k} - 1 and q=2k−1−1q = 2^{k-1} - 1 are both prime, but it is not possible to have two consecutive Mersenne primes.

Solution 4. Let a=p,b>pa = p, b > p and p⩾5p \geqslant 5 (the remaining cases are dealt with as in solution 3). Modulo (p+1)2(p+1)^{2} it holds that
pp−p=(p+1−1)p−p≡(p1)(p+1)(−1)p−1+(−1)p−p=p(p+1)−1−p=p2−1≢0(mod(p+1)2) p^{p} - p = (p+1-1)^{p} - p \equiv \binom{p}{1}(p+1)(-1)^{p-1} + (-1)^{p} - p = p(p+1) - 1 - p = p^{2} - 1 \not\equiv 0 \pmod{(p+1)^{2}}
Since p⩾5p \geqslant 5, the numbers 22 and p+12\frac{p+1}{2} are distinct and less than or equal to pp. Therefore, p+1∣p!p+1 \mid p!, and so (p+1)2∣(p+1)!(p+1)^{2} \mid (p+1)!.
But b⩾p+1b \geqslant p+1, so b!≡0≢pp−p(mod(p+1)2)b! \equiv 0 \not\equiv p^{p} - p \pmod{(p+1)^{2}}, a contradiction.

Therefore, the only solutions are (2,2,2)(2, 2, 2) and (3,4,3)(3, 4, 3).

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