Let us assume mn > 1. Obviously n is odd. Let p > 3 be the smallest
prime divisor of n. In this case (p — 1,n) = 1. Since 2" +1 | 27" - 1, we
have that p | 2°" — 1. Thus it follows from Fermat's little theorem and
elementary number theory that p | (2?" — 1,2?-!-1) = 2@mP-) — 1,
Since (2n,p — 1) < 2, it follows that p | 3 and hence p= 3.
Let us assume now that n is of the form n = 3*d, where 2,34 d. We first
prove that k = 1.
Lemma. If 2™ — 1 is divisible by 3", then m is divisible by 3°-1.
Proof. This is the lemma from (SL97-14) with p = 3, a = 2”, k =m,
a=l,and§=r.
Since 3?* divides n? | 2?" — 1, we can apply the lemma to m = 2n and
r = 2k to conclude that 3?*-! | n = 3*d. Hence k = 1.
Finally, let us assume d > 1 and let g be the smallest prime factor of d.
Obviously g is odd, g > 5, and (n,g—1) € {1,3}. We then have g | 2?"-1
and g | 27-1 — 1, Consequently, g | 2@™-) —1 = 22(™9-)) _ 1, which
divides 2-1 = 63 = 37-7, so we must have g = 7. However, in that case
we obtain 7| n | 2" +1, which is a contradiction, since powers of two can
only be congruent to 1,2 and 4 modulo 7. It thus follows that d= 1 and
n=3. Hencen > 1S>n=3.
It is easily verified that n = 1 and n = 3 are indeed solutions. Hence these
are the only solutions.