Maths Olympiad Prep

Library / /17 of 33

Number theory Difficulty 8.1 Shortlist Prove it Turkey

Determine all positive integers mm, nn and prime numbers pp such that
5m+2np5m2np \frac{5^m + 2^n p}{5^m - 2^n p}
is a square of an integer.

Solution

The answer is (m,n,p)=(2,3,3)(m, n, p) = (2, 3, 3), (1,1,2)(1, 1, 2) or (2,2,5)(2, 2, 5).
Let 5m+2np5m2np=k2\frac{5^m + 2^n p}{5^m - 2^n p} = k^2 for some positive integer kk. Note that 5m2np5m+2np5^m - 2^n p \mid 5^m + 2^n p implies that 5m2np25m5^m - 2^n p \mid 2 \cdot 5^m. Then as 5m2np5^m - 2^n p is odd, 5m2np5m5^m - 2^n p \mid 5^m and hence 5m2np=5r5^m - 2^n p = 5^r for some non-negative integer rr.

Case 1: r=0r = 0 i.e. 5m2np=15^m - 2^n p = 1.
If n3n \ge 3, then 5m1(mod8)5^m \equiv 1 \pmod 8 and hence m=2sm = 2s for some positive integer ss. Then 52s1(mod3)5^{2s} \equiv 1 \pmod 3 and we have 2np0(mod3)2^n p \equiv 0 \pmod 3. Thus, p=3p = 3 and (5s1)(5s+1)=32n(5^s - 1)(5^s + 1) = 3 \cdot 2^n. Observe that 5s+12(mod4)5^s + 1 \equiv 2 \pmod 4 and has an odd divisor greater than 3 when s>1s > 1.

Therefore s=1s = 1 and hence m=2m = 2, n=3n = 3 and k=7k = 7.
If n=2n = 2, then 8p=(5m+22p)(5m22p)=k218p = (5^m + 2^2p) - (5^m - 2^2p) = k^2 - 1. Therefore k=2l+1k = 2l + 1 for some positive integer ll and 2p=l(l+1)2p = l(l+1). Then clearly p=3p = 3 and hence 5m=135^m = 13 which yields a contradiction.
If n=1n = 1, then 4p=(5m+21p)(5m21p)=k214p = (5^m + 2^1p) - (5^m - 2^1p) = k^2 - 1. Therefore k=2l+1k = 2l + 1 for some positive integer ll and p=l(l+1)p = l(l+1). Then clearly l=1l = 1, p=2p = 2 and hence k=3k = 3, m=1m = 1.

Case 2: r1r \ge 1.
Then 52np5 \mid 2^n p and hence p=5p = 5. Therefore, 5m12n=5r15^{m-1} - 2^n = 5^{r-1} implies that r=1r = 1 since m>rm > r and 5r12n5^{r-1} \mid 2^n. Thus, we have 5m12n=15^{m-1} - 2^n = 1. Clearly n1n \ne 1 and if n=2n = 2, then m=2m = 2 and k=3k = 3.
If n3n \ge 3, then 5m11(mod8)5^{m-1} \equiv 1 \pmod 8 and hence m1=2sm-1 = 2s for some positive integer ss. Then (5s1)(5s+1)=2n(5^s - 1)(5^s + 1) = 2^n. Observe that 5s+12(mod4)5^s + 1 \equiv 2 \pmod 4 and has an odd divisor greater than 1 when s1s \ge 1. Therefore s=0s = 0 and hence 2n=02^n = 0 which yields a contradiction.

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: MathNet, licensed CC-BY-4.0. Statement and solution reproduced as published; topic and difficulty added by this site.