Problem

Source: MEMO 2009, problem 4, single competition

Tags: quadratics, modular arithmetic, number theory, number theory proposed



Determine all integers $ k\ge 2$ such that for all pairs $ (m$, $ n)$ of different positive integers not greater than $ k$, the number $ n^{n-1}-m^{m-1}$ is not divisible by $ k$.