Prove that there exist infinitely many positive integer $n$ such that $\sqrt[d]{f(n)}\notin \mathbb{Z}$. 
Let $f(x)\in \mathbb{Z}[x]$ be a polynomial of degree $m\geq 1$, and $d\in \mathbb{N}$ does not divide $m$. Prove that there exist infinitely many positive integer $n$ such that $\sqrt[d]{f(n)}\notin \mathbb{Z}$.

I was working on the following problem and haven't yet solved it.
$g\in \mathbb{Q}[x]$ is a polynomial of degree $2022$. Prove there exist infinitely many rational $q$ such that $\sqrt[5]{g(q)}\notin \mathbb{Q}$.
Then I found a somewhat generalized version in the same problem list. As I explained in the link, for the polynomial of degree 3, one can prove that there exist infinitely many integer $n$ such that $f(n)$ is not a perfect square by considering two cases; (i) the leading coefficient $a<0$ and (ii) $a>0$. However, this method doesn't work in this problem and the problem in the link above. Is there any clever method?
 A: This stronger statement is true:
Let $f(x) \in \mathbb{Z}[x]$, and suppose $\sqrt[d]{f(n)} \in \mathbb{Z}$ for all but finitely many positive integers $n$. Then $f(x) = (g(x))^d$ for some $g(x) \in \mathbb{Z}[x]$.
Proof:
We first consider the case where $f(x)$ is irreducible.
Facts:

*

*For any non-constant polynomial $f(x)$, the set of primes dividing some value of $f$ is infinite.

*For any squarefree polynomial $f(x)$, only finitely many primes divide the discriminant of $f(x)$.

*A polynomial $f(x)$ is squarefree modulo any prime not dividing its discriminant.

Let $p$ be one of the infinitely many primes dividing some value of $f$, but not dividing the discriminant of $f(x)$. Let $n$ be one of the values such that $p \mid f(n)$. We can assume $n$ is large enough that $f(n)$ is a $d$th power.
Write
$$f(x) = a_0 + a_1(x-n) + a_2(x-n)^2+\ldots$$
We'll assume $d \ge 2$. Note that

*

*$p^2 \mid a_0$ since $f(n)$ is a perfect $d$th power with $d\ge 2$.

*$p \not \mid a_1$; otherwise, $(x-n)^2$ would divide $f(x)$ mod $p$, contradicting the fact that $f(x)$ is squarefree mod $p$.

If $m$ is any integer satisfying
$$p \mid (m-n) \qquad \text{and} \qquad p^2 \not \mid (m-n)$$
then the above expansion shows that
$$p \mid f(m) \qquad \text{and} \qquad p^2 \not \mid f(m).$$
Thus $f(m)$ is not a perfect $d$th power.

Now we move to the general case, where $f(x)$ is not necessarily irreducible.
Let $h(x)$ be any irreducible factor of $f(x)$. As before, take $p$ to be one of the  infinitely many primes dividing $h(n)$ for some integer $n$. But this time, we place the restriction that $p$ does not divide the discriminant of the squarefree part of $f(x)$. We will use one more fact:

*

*Let $f(x)$ have irreducible factors $h_i(x)$, and let $p$ be any prime not dividing the discriminant of the squarefree part of $f(x)$. Then for each integer $n$,$\,$ $p$ divides at most one of the $h_i(n)$.

Now, a similar argument to the above shows that $h(x)$ has infinitely many values $h(m)$ such that $p \mid h(m)$ but $p^2 \not \mid h(m)$. By the fact above, none of the other irreducible factors of $f(x)$ contribute to the exponent of $p$ in $f(m)$. So in order for $f(m)$ to be a $d$th power, the exponent of $h(x)$ in the factorization of $f(x)$ must be divisible by $d$.
This argument shows each non-constant irreducible factor of $f(x)$ is a $d$th power. Finally, the constant factor must be a $d$th power as well, otherwise none of the values of $f$ would be a $d$th power. So $f(x)$ is a $d$th power in $\mathbb{Z}[x]$.
$$\tag*{$\square$}$$
