MathLabs

Problem 3

Determine all integers n>1n>1 such that (2n+1)/n2(2^n+1)/n^2 is an integer.
Step 2 of 4: The order argument forces p=3
x=min⁡{r>0:2r≡−1(modp)},y=min⁡{r>0:2r≡1(modp)},x∣nx=\min\{r>0:2^r\equiv-1\pmod p\},\quad y=\min\{r>0:2^r\equiv1\pmod p\},\quad x\mid n
Detailed analysis

Let xx and yy be the least positive exponents with 2x≡−1(modp)2^x\equiv-1\pmod p and 2y≡1(modp)2^y\equiv1\pmod p. Write n=ys+rn=ys+r with 0≤r<y0\le r<y. Since 2n≡−12^n\equiv-1 and 2y≡12^y\equiv1, 2r≡−12^r\equiv-1; hence r>0r>0 and x≤r<yx\le r<y. Now write n=hx+kn=hx+k with 0≤k<x0\le k<x. Then −1≡(−1)h2k(modp)-1\equiv(-1)^h2^k\pmod p. If hh is even, this says 2k≡−12^k\equiv-1, contradicting the minimality of xx when k>0k>0; if hh is odd, it says 2k≡12^k\equiv1, contradicting the minimality of yy because 0<k<x<y0<k<x<y. Thus k=0k=0, so x∣nx\mid n. Also x≤r<y<px\le r<y<p, and the smallest prime divisor pp of nn forces x=1x=1. Therefore 2≡−1(modp)2\equiv-1\pmod p and p=3p=3.