Olympiad Maths Prep

Track / Stage 8 / 126 of 180 #1826 of 2000

Problem 1826

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, read the official solution, then mark yourself honestly — the ladder only means something if the record is true.

Official solution

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

Case 1: We have a<pa < p. Then we either have aba \leqslant b which implies aapb!=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!<appb! \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!=app>pppp!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!=appb! = 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=apb!p = a^{p} - b! which is impossible. On the other hand, the case ap2a \geqslant p^{2} is also impossible since then ap(p2)p>(2p1)!+pb!+pa^{p} \geqslant (p^{2})^{p} > (2p-1)! + p \geqslant b! + p.

Comment. The inequality p2p>(2p1)!+pp^{2p} > (2p-1)! + p can be shown e.g. by using
(2p1)!=[1(2p1)][2(2p2)][(p1)(p+1)]p<((2p2)2)p1p=p2p1 (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!=pppb! = 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 p7p \geqslant 7. We have b!=ppp>p!b! = p^{p} - p > p! and so bp+1b \geqslant p + 1 which implies that
v2((p+1)!)v2(b!)=v2(pp11)=LTE2v2(p1)+v2(p+1)1=v2(p12(p1)(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+18p+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 apa \neq p are covered as in solution 1, as are p=2,3p = 2, 3. For p5p \geqslant 5 we have b!=p(pp11)b! = p(p^{p-1} - 1). By Zsigmondy's Theorem there exists some prime qq that divides pp11p^{p-1} - 1 but does not divide pk1p^{k} - 1 for k<p1k < p-1. It follows that ordq(p)=p1\operatorname{ord}_{q}(p) = p-1, and hence q1mod(p1)q \equiv 1 \bmod (p-1). Note that pqp \neq q. But then we must have q2p1q \geqslant 2p-1, giving
b!(2p1)!=[1(2p1)][2(2p2)][(p1)(p+1)]p>(2p1)p1p>pp>ppp, 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 apa \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 p13p \geqslant 13. Let qp+1q \mid p+1 be an odd prime. By LTE
vq(ppp)=vq((p2)p121)=vq(p21)+vq(p12)=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 bp+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 qp1q \mid p-1 be an odd prime. By LTE
vq(ppp)=2vq(p1) v_{q}\left(p^{p} - p\right) = 2 v_{q}(p-1)
Let d=vq(p1)d = v_{q}(p-1). Then p1+qdp \geqslant 1 + q^{d}, so
vq(b!)vq(p!)vq(qd!)>qd12d v_{q}(b!) \geqslant v_{q}(p!) \geqslant v_{q}\left(q^{d}!\right) > q^{d-1} \geqslant 2d
provided d2d \geqslant 2 and q>3q > 3, or d3d \geqslant 3.
If q=3,d=2q = 3, d = 2 and p13p \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, d1d \leqslant 1.
If p>2q+1p > 2q + 1 (so p>3qp > 3q, as qp1q \mid p-1) then
vq(b!)vq((3q)!)=3 v_{q}(b!) \geqslant v_{q}((3q)!) = 3
so we must have qp2q \geqslant \frac{p}{2}, in other words, p1=2qp-1 = 2q. This implies that p=2k1p = 2^{k} - 1 and q=2k11q = 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 p5p \geqslant 5 (the remaining cases are dealt with as in solution 3). Modulo (p+1)2(p+1)^{2} it holds that
ppp=(p+11)pp(p1)(p+1)(1)p1+(1)pp=p(p+1)1p=p21≢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 p5p \geqslant 5, the numbers 22 and p+12\frac{p+1}{2} are distinct and less than or equal to pp. Therefore, p+1p!p+1 \mid p!, and so (p+1)2(p+1)!(p+1)^{2} \mid (p+1)!.
But bp+1b \geqslant p+1, so b!0≢ppp(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 and solution reproduced as published; topic, difficulty and ordering added by this site.