How prove this and for any non-negative integer $k$, there exists a non-negative integer $k'$ such that $v_p(f(k))For a given positive integer $n$ and prime number $p$, find the minimum value of positive integer $m$ that satisfies the following property: for any polynomial $$f(x)=(x+a_1)(x+a_2)\ldots(x+a_n)$$ ($a_1,a_2,\ldots,a_n$ are positive integers), and for any non-negative integer $k$, there exists a non-negative integer $k'$ such that $$v_p(f(k))<v_p(f(k'))\leq v_p(f(k))+m.$$ Note: for non-zero integer $N$,$v_p(N)$ is the largest non-zero integer $t$ that satisfies $p^t\mid N$.
The answer is $\boxed{n+\nu_p(n!)}$. To show that $m\ge n+\nu_p(n!)$ is necessary (which is the important motivation), take
$$f(x)=(x+p)(x+2p)...(x+np).$$
and $k=1$. It's easy to see that whenever $p$ divides $f(k')$ then $p\mid k'$. Letting $k' = pr$, we notices that
$$f(k') = p^n(r+1)(r+2)...(r+n)\implies p^nn!\mid f(k')$$
so $m\ge n+\nu_p(n!)$ as desired.
Now we show that $m=n+\nu_p(n!)$ works. then I can't it
 A: Note: In this answer, I will ignore the requirement that $k'$ be positive. This is not an issue, since we may always replace $k'$ with $k' + p^s$ for a sufficiently large $s$.

Lemma: For any positive integer $n$ and any monic polynomial $f \in \Bbb Z[x]$ of degree $n$, there exists an integer $k$ such that $v_p(f(k)) \leq v_p(n!)$.
Proof: It is an easy exercise to show that $$\sum_{k = 0}^n (-1)^{n - k}\binom n k f(k) = n!$$ and hence at least one of $k = 0, 1, \dots n$ satisfies $v_p(f(k)) \leq v_p(n!)$.
Proposition: Let $a_1, \dots, a_n$ be integers, and let $k$ be an integer such that $k + a_i\neq 0$ for every $i$. Then there exists an integer $k'$ such that $$v_p\left(\prod_{i = 1}^n(k + a_i)\right) < v_p\left(\prod_{i = 1}^n(k' + a_i)\right) \leq v_p\left(\prod_{i = 1}^n(k + a_i)\right) + n + v_p(n!).$$
Proof: Without loss of generality, we assume that $v = v_p(k + a_1)$ is the maximum among all $v_p(k + a_i)$. We also assume that $v_p(a_i - a_1) > v$ for $i = 1, \dots, r$ and $v_p(a_i - a_1) \leq v$ for $i = r + 1, \dots, n$.
I claim that there exists $k'$ of the form $k' = p^{v + 1}x - a_1$ which satisfies the required property.
Indeed, if $k' = p^{v + 1}x - a_1$ for some integer $x$, then it is easy to show that $v_p(k' + a_i) = v_p(k + a_i)$ for $i = r + 1, \dots, n$. Moreover, we have $$\prod_{i = 1}^r(k' + a_i) = \prod_{i = 1}^r (p^{v + 1}x + a_i - a_1) = p^{r(v + 1)}\prod_{i = 1}^r(x + \frac{a_i - a_1}{p^{v + 1}}).$$
By the Lemma, we may choose $x$ such that the $v_p$ of the right hand side is $\leq r(v + 1) + v_p(r!)$.
Since $v_p(x + a_i)$ is equal to $v$ for $i = 1, \dots, r$, we get $$r + v_p\left(\prod_{i = 1}^n(k + a_i)\right) \leq v_p\left(\prod_{i = 1}^n(k' + a_i)\right) \leq r + v_p(r!) + v_p\left(\prod_{i = 1}^n(k + a_i)\right).$$ This finishes the proof, as $1 \leq r \leq n$ holds.
