Problem

Source: Romania TST 5 2012, Problem 1

Tags: quadratics, algebra, polynomial, number theory proposed, number theory



Find all triples $(a,b,c)$ of positive integers with the following property: for every prime $p$, if $n$ is a quadratic residue $\mod p$, then $an^2+bn+c$ is a quadratic residue $\mod p$.