MathLabs

Problem 4

Find all ordered pairs of positive integers (m,n)(m,n) for which n3+1mn−1\frac{n^3+1}{mn-1} is an integer.
Step 1 of 4: Introduce the quotient
In plain words

The divisibility condition supplies a second factor with a useful residue modulo nn.

n3+1=(mn−1)hn^3+1=(mn-1)h
Detailed analysis

Let hh be the positive quotient. Since h≡−1(modn)h\equiv-1\pmod n, write h=kn−1h=kn-1 with kk positive. Expanding gives n2=mkn−(m+k)n^2=mkn-(m+k), so nn divides m+km+k.