Let $f(x)$ be a non-constant polynomial with integer coefficients. It is a well-known result that if $f(n)$ is a square for all integers $n$, then $f$ must in fact be the square of a polynomial (see, for example: http://www.mast.queensu.ca/~murty/poly2.pdf).
My question is the following. Suppose that $\deg f = d$, and suppose that for every integer $n$, we have that $f(n)$ is a perfect $k$-th power for some $k > 1$$k_n > 1$ dividing $d$. I want to emphasize that $k_n$ is allowed to depend on $n$. For instance, it could be the case that $f$ is of degree $6$ and $f(2) = 2^3$ while $f(3) = 3^2$, and $f(n)$ is either a square or a cube (or both) for every $n$.
Can we conclude that $f$ is a perfect $m$-th power, for some $m > 1$ dividing $d$?