From Fundamentals of Number Theory by LeVeque, section 3.1, prob. 1
Let $f(x) = a_0x^n + \cdots + a_n$ be a polynomial over Z. Show that if $r$ consecutive values of $f$ (i.e., values for consecutive integers) are all divisible by $r$, then $r|f(m)$ for all $m \in Z$. Show by an example that this can happen with $r \gt 1$, even when $(a_0, \cdots, a_n) = 1$.
Can someone give me a hint on how to proceed? (not a full answer please.. just a nudge in the right direction.) I tried playing around with the division algorithm and looking for $r$ as as the $GCD(f(m), f(x))$ but I'm not making any headway. Seems to me the only way this can happen is if $r|a_i$ across the board but the last line about 'even when $(a_0, \cdots, a_n) = 1$' says that's not true..
Thanks in advance.
Also props to anyone who can think of a specific applications of this property in a non-number theory situation like an optimization or how this might come up when coding.
Possible Answer -- Thanks for all the help guys! Here's what I came up with after fiddling with your suggestions:
Starting with the binomial theorm:
$(x+y)^n = \sum_{k=0}^n {n \choose k}x^{n-k}y^k = \sum_{k=0}^n {n \choose k}x^{k}y^{n-k}$
I write,
$(rp + q)^n = \sum_{k=0}^n {n \choose k}(rp)^{k}q^{n-k}= {n \choose 0}q^n$ mod $r= q^n$ mod $r$
$\Rightarrow f(rp+q) \equiv f(q)$ mod $r$
Now, since (1) any $m \in Z$ can be written as $m=rp+q$ for some $p,q \in Z$, and (2) we know the $r$ consecutive values of integers cover all members of $Z_r$, and (3) $r|f(q)$ for all $q \in Z_r$ then by (1), (2), (3) and the binomial calculation above $r|f(m)$ for all $m \in Z$.
I think that works. Can anyone confirm?