### 2000 IMO SL #N4

Find all triplets of positive integers $(a,m,n)$ such that $a^m + 1 \mid (a + 1)^n$.

The answer is $\boxed{(a,1,n),(1,m,n)},$ and $\boxed{(2,3,n)\text{ where }n>1}$.

We have 3 cases.

For our first case, we have $m=1$. Then we have $a+1 \mid (a+1)^n$ which is true for all positive integers $a, n$. So, $(a,m,n)=(a,1,n)$.

For our second case, we have $a=1$. This implies $2 \mid 2^n$ which is true for all positive integers $m,n$. So, $(a,m,n)=(1,m,n)$.

For our final case, we consider $a,m>1$. Because $\gcd(a,1)=1$, we use Zsigmondy's theorem assuming that $(a,m) \ne (2,3)$ so let $p$ such that $p \mid a^m+1$ and $p \not \; \mid a+1$. However, $p \mid a^m+1 \mid (a+1)^n$, so we get a contradiction. Therefore, $a=2$ and $m=3$ and because $9 \mid 3^n$ is true for all $n>1$ the only possibility for this case is $(a,m,n)=(2,3,n)$ where $n>1$.

We are done. $\square$