Problem

Source: German TST 2023 AIMO 2, Problem 1

Tags: algebra, polynomial



Let $P$ be a polynomial with integer coefficients. Assume that there exists a positive integer $n$ with $P(n^2)=2022$. Prove that there cannot be a positive rational number $r$ with $P(r^2)=2024$.