Problem

Source: ELMO Shortlist 2024/N3

Tags: number theory, Elmo, ratio



Given a positive integer $k$, find all polynomials $P$ of degree $k$ with integer coefficients such that for all positive integers $n$ where all of $P(n)$, $P(2024n)$, $P(2024^2n)$ are nonzero, we have $$\frac{\gcd(P(2024n), P(2024^2n))}{\gcd(P(n), P(2024n))}=2024^k.$$Allen Wang