# 1994 IMO Problems/Problem 4

## Problem

Find all ordered pairs $(m,n)$ where $m$ and $n$ are positive integers such that $\frac {n^3 + 1}{mn - 1}$ is an integer.

## Solution

Suppose $\frac{n^3+1}{mn-1}=k$ where $k$ is a positive integer. Then $n^3+1=(mn-1)k$ and so it is clear that $k\equiv -1\pmod{n}$. So, let $k=jn-1$ where $j$ is a positive integer. Then we have $n^3+1=(mn-1)(jn-1)=mjn^2-(m+j)n+1$ which by cancelling out the $1$s and dividing by $n$ yields $n^2=mjn-(m+j)\Rightarrow n^2-mjn+m+j=0$. The equation $x^2-mjx+m+j=0$ is a quadratic. We are given that $n$ is one of the roots. Let $p$ be the other root. Notice that since $n+p=mj$ we have that $p$ is an integer, and so from $np=m+j$ we have that $p$ is positive.

It is obvious that $j=m=n=p=2$ is a solution. Now, if not, and $j,m,n,p$ are all greater than $1$, we have the inequalities $np>n+p$ and $mj>m+j$ which contradicts the equations $np=m+j, n+p=mj$. Thus, at least one of $j,m,n,p$ is equal to $1$.

If one of $m,j$ is $1$, without loss of generality assume it is $j$. Then we have $np=m+1, n+p=m$. That is, $np-n-p=1\Rightarrow (n-1)(p-1)=2$ which gives positive solutions $(n,p)=(3,2),(2,3)$. These give $m=5$ and since we assumed $j=1$, we can also have $m=1$ and $j=5$.

If one of $n,p$ is $1$, without loss of generality assume it is $p$. Then we have $n=m+j, n+1=mj$. That is, $mj-m-j=1\Rightarrow (m-1)(j-1)=2$ which gives positive solutions $(m,j)=(3,2),(2,3)$. These give $n=5$ and since we assumed $p=1$, we can also have $n=1$ and $p=5$.

From these, we have all solutions $(m,n)=(2,2),(5,3),(5,2),(1,3),(1,2),(3,5),(2,5),(3,1),(2,1)$.