Problem

Source: Polish National Olympiad 2015 2nd round, 3rd problem

Tags: number theory



Let $a_{n}=|n(n+1)-19|$ for $n=0, 1, 2, ...$ and $n \neq 4$. Prove that if for every $k<n$ we have $\gcd(a_{n}, a_{k})=1$, then $a_{n}$ is a prime number.