Problem

Source: 2017 Indonesia MO, Problem 3

Tags: number theory



A positive integer $d$ is special if every integer can be represented as $a^2 + b^2 - dc^2$ for some integers $a, b, c$. Find the smallest positive integer that is not special. Prove 2017 is special.