MathLabs

Problem 3

Determine all integers n>1n>1 such that (2n+1)/n2(2^n+1)/n^2 is an integer.
Step 1 of 4: Start with parity and a smallest prime divisor
n is odd,2n≡−1(modp)n\text{ is odd},\qquad 2^n\equiv-1\pmod p
Detailed analysis

Since 2n+12^n+1 is odd, n is odd. Let p be the smallest prime divisor of n; reducing n2∣2n+1n^2\mid2^n+1 modulo p gives 2n≡−1(modp)2^n\equiv-1\pmod p.