Problem

Source: IX International Festival of Young Mathematicians Sozopol, Theme for 10-12 grade

Tags: number theory, prime numbers



Let $p$ be some prime number. a) Prove that there exist positive integers $a$ and $b$ such that $a^2 + b^2 + 2018$ is multiple of $p$. b) Find all $p$ for which the $a$ and $b$ from a) can be chosen in such way that both these numbers aren’t multiples of $p$.