IMO 1997 · Problem 5

Find all pairs \((a,b)\) of integers \(a,b\geq 1\) that satisfy the equation \[ a^{b^2}=b^a. \]

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

Answer

\[ \boxed{(a,b)\in\{(1,1),(16,2),(27,3)\}.} \]

Solution

If \(a=1\), the equation gives \(b=1\); likewise, if \(b=1\), it gives \(a=1\). Thus \((1,1)\) is the only solution with either coordinate equal to \(1\). Henceforth suppose \(a,b>1\).

Let \[ d=\gcd(a,b^2),\qquad r=\frac{a}{d},\qquad s=\frac{b^2}{d}. \] Then \(\gcd(r,s)=1\), and taking the positive \(d\)-th root of the original equation gives \[ a^s=b^r. \] We claim that there is an integer \(c>1\) such that \[ a=c^r,\qquad b=c^s. \] Indeed, for every prime \(p\), let \(\alpha_p,\beta_p\) be its exponents in \(a,b\), respectively. The last equation gives \[ s\alpha_p=r\beta_p. \] Coprimality implies that \(\alpha_p=rt_p\) and \(\beta_p=st_p\) for some nonnegative integer \(t_p\). Therefore \(c=\prod_p p^{t_p}\) has the required properties, and \(c>1\) because \(a>1\).

Substitution into the original equation, followed by equality of exponents to the base \(c>1\), yields \[ r c^{2s}=s c^r. \]

Case 1: \(r<2s\). Rearranging gives \[ s=r c^{2s-r}. \] Thus \(r\mid s\), so \(\gcd(r,s)=1\) forces \(r=1\). Consequently, \[ s=c^{2s-1}\geq 2^{2s-1}\geq 2^s\geq s+1, \] a contradiction. Here \(2s-1\geq s\) because \(s\geq1\), and \(2^s=(1+1)^s\geq1+s\) by the binomial theorem.

Case 2: \(r\geq2s\). Now \[ r=s c^{r-2s}, \] so \(s\mid r\), and coprimality forces \(s=1\). Hence \[ c^{r-2}=r,\qquad r\geq2. \] For \(r=2\), this is impossible. For \(r=3\), it gives \(c=3\); for \(r=4\), it gives \(c=2\).

There are no possibilities with \(r\geq5\), because \[ c^{r-2}\geq2^{r-2}>r. \] The strict inequality holds at \(r=5\), since \(8>5\), and follows inductively: if \(2^{r-2}>r\), then \[ 2^{(r+1)-2}>2r>r+1. \]

Thus the solutions with \(a,b>1\) can only be \[ (a,b)=(3^3,3)=(27,3),\qquad (a,b)=(2^4,2)=(16,2). \] Both satisfy the equation: \[ 27^{3^2}=(3^3)^9=3^{27}, \qquad 16^{2^2}=(2^4)^4=2^{16}. \] Together with \((1,1)\), these give exactly the stated answer.

The solution was checked against Evan Chen's published IMO solution notes.