Problem

Source: European Girl's MO 2013, Problem 4

Tags: algebra, polynomial, number theory, EGMO



Find all positive integers $a$ and $b$ for which there are three consecutive integers at which the polynomial \[ P(n) = \frac{n^5+a}{b} \] takes integer values.