Problem

Source: ELMO 2014 Shortlist N11, by Victor Wang

Tags: algebra, polynomial, modular arithmetic, number theory proposed, number theory



Let $p$ be a prime satisfying $p^2\mid 2^{p-1}-1$, and let $n$ be a positive integer. Define \[ f(x) = \frac{(x-1)^{p^n}-(x^{p^n}-1)}{p(x-1)}. \] Find the largest positive integer $N$ such that there exist polynomials $g(x)$, $h(x)$ with integer coefficients and an integer $r$ satisfying $f(x) = (x-r)^N g(x) + p \cdot h(x)$. Proposed by Victor Wang