IMO 1990 · Problem 3

Determine all integers \(n>1\) such that \[ \frac{2^n+1}{n^2} \] is an integer.

Official text of the problem. Official problem paper (PDF)

Answer

\[ \boxed{n=3}. \]

Solution

Suppose that \(n^2\mid 2^n+1\). Since \(2^n+1\) is odd, \(n\) is odd.

For any prime \(p\mid n\), we have \[ 2^n\equiv-1\pmod p. \] Let \(r\) be the multiplicative order of \(2\) modulo \(p\). Thus \(r\mid 2n\) but \(r\nmid n\). Since \(n\) is odd, we may write \(r=2d\), where \(d\mid n\). Fermat’s little theorem gives \(2d\mid p-1\), so \[ d\le \frac{p-1}{2}<p. \] Moreover, \(2^d\) has square congruent to \(1\) modulo \(p\), but is not itself congruent to \(1\). As \(p\) is an odd prime, \[ 2^d\equiv-1\pmod p. \tag{1} \]

Now take \(p\) to be the smallest prime divisor of \(n\). Because \(d\mid n\) and \(d<p\), we must have \(d=1\): otherwise a prime divisor of \(d\) would be a prime divisor of \(n\) smaller than \(p\). Equation (1) then gives \(p\mid 3\), hence \(p=3\). In particular, \(3\mid n\).

We next show that \(3\) divides \(n\) exactly once. Write \[ n=3^a u,\qquad a\ge1,\qquad 3\nmid u. \] Here \(u\) is odd, so \(u\equiv1\) or \(5\pmod6\). Since \(2^6\equiv1\pmod9\), it follows that \[ 2^u+1\equiv3\ \text{or}\ 6\pmod9. \] Thus \(2^u+1\) is divisible by \(3\) exactly once.

For any integer \(x\equiv-1\pmod3\), write \(x=-1+3t\). Then \[ x^3+1=(x+1)(x^2-x+1), \qquad x^2-x+1=3(1-3t+3t^2), \] and the second factor is divisible by \(3\) exactly once. Consequently, replacing an odd exponent \(m\) by \(3m\) increases the exponent of \(3\) dividing \(2^m+1\) by exactly one. Applying this \(a\) times shows that \(2^n+1\) is divisible by \(3\) exactly \(a+1\) times.

Since \(n^2\mid 2^n+1\), we therefore have \[ 2a\le a+1. \] Together with \(a\ge1\), this yields \(a=1\).

Thus \(n=3u\) with \(3\nmid u\). Suppose \(u>1\), and let \(q\) be its smallest prime divisor. Then \(q\ge5\). Applying the order argument above to \(q\), there exists a divisor \(d\mid n\) with \(d<q\) and \[ q\mid 2^d+1. \] Every prime divisor of \(u\) is at least \(q\), so no such prime can divide \(d\). Because \(n=3u\) contains only one factor of \(3\), this forces \(d=1\) or \(d=3\). Hence \(q\) divides either \(3\) or \(9\), contradicting \(q\ge5\).

Therefore \(u=1\) and \(n=3\). Finally, \[ \frac{2^3+1}{3^2}=1, \] so \(n=3\) indeed satisfies the condition.

The solution was checked against John Scholes' IMO solution archive (Kalva).