Here Is A Nice Problem From The Republic Of Kosovo
Here is a nice problem from the Kosovo National Math Olympiad. You should be able to do it with a little amount of thought.
Using the method of polynomial division explained , dividing $n^2 + n - 27$ by $n - 5$, we get:
$quotient = (n + 6)$ and $remainder = 3$
Therefore, we can write:
$\dfrac{n^2 + n - 27}{n - 5} = (n + 6) + \dfrac{3}{n - 5}$
If $n^2 + n - 27$ is divisible by $n - 5$ then $\dfrac{3}{n - 5}$ is an integer, that is $3$ is divisible by $n - 5$.
Therefore, $n - 5 = \pm 1$ or $n - 5 = \pm 3$
Therefore,
$n = 3, 6, 2, 8$
Therefore, the maximum value of $n$ satisfying the divisibility condition is $n = 8$