Maths Olympiad Prep

Library / Saudi Arabian Mathematical Competitions /197 of 395

Saudi Arabian Mathematical Competitions

Number theory Difficulty 5.6 AIME, harder Prove it Saudi Arabia

Find all primes p,qp, q satisfying the equation 2pq−qp=72 p^{q} - q^{p} = 7.

Solution

It is clear that qq must be odd, hence q≥3q \geq 3.

Case 1. If p=2p = 2, then we get 2q+1=q2+72^{q+1} = q^{2} + 7. For any n≥4n \geq 4 we have 2n+1>n2+72^{n+1} > n^{2} + 7 (by induction). Hence q=3q = 3, and we get solution (2,3)(2, 3).

Case 2. If p≥3p \geq 3, then we can write, and using Fermat Little Theorem,
qp=2pq−7=2(pq−p)+(2p−7)⇒q∣2p−7 q^{p} = 2 p^{q} - 7 = 2\left(p^{q} - p\right) + (2p - 7) \Rightarrow q \mid 2p - 7
and
2pq=qp+7=(qp−q)+(q+7)⇒p∣q+7. 2 p^{q} = q^{p} + 7 = \left(q^{p} - q\right) + (q + 7) \Rightarrow p \mid q + 7.
Set q+7=kpq + 7 = k p.
If 2p−7≤0⇒p=32p - 7 \leq 0 \Rightarrow p = 3, hence q∣−1q \mid -1, not possible.
If 2p−7>0⇒2p−7≥q2p - 7 > 0 \Rightarrow 2p - 7 \geq q, hence 2p≥q+7=kp2p \geq q + 7 = k p, and we get k≤2k \leq 2. Therefore, we have only two possibilities for kk: k=1k = 1, k=2k = 2.
If k=1⇒q+7=p⇒q∣2q+7⇒q=7k = 1 \Rightarrow q + 7 = p \Rightarrow q \mid 2q + 7 \Rightarrow q = 7 and p=14p = 14, not a prime, contradiction.
If k=2⇒q+7=2pk = 2 \Rightarrow q + 7 = 2p. If q>pq > p, then we have p,q≥3p, q \geq 3. Hence 7=2pq−qp=pq≥277 = 2 p^{q} - q^{p} = p^{q} \geq 27, since pq>qpp^{q} > q^{p}, not possible. Then p>qp > q, and we get q+7=2p>2q⇒q<7⇒q=3q + 7 = 2p > 2q \Rightarrow q < 7 \Rightarrow q = 3 or q=5q = 5. In first case we obtain p=5p = 5 and in the second case contradiction. Finally, the solutions are (p,q)=(2,3),(5,3)(p, q) = (2, 3), (5, 3).

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.