Problem

Source: Baltic Way 2015

Tags: number theory, Lifting the Exponent



Find all positive integers $n$ for which $n^{n-1} - 1$ is divisible by $2^{2015}$, but not by $2^{2016}$.