Problem

Source: Bulgarian Spring Tournament 2023 12.3

Tags: factorial, number theory



Given is a polynomial $f$ of degree $m$ with integer coefficients and positive leading coefficient. A positive integer $n$ is $\textit {good for f(x)}$ if there exists a positive integer $k_n$, such that $n!+1=f(n)^{k_n}$. Prove that there exist only finitely many integers good for $f$.