Prove $1^{2007}+2^{2007}+\cdots+n^{2007}$ is not divisible by $n+2$ Prove that for any odd natural number $n$, the number $1^{2007}+2^{2007}+\cdots+n^{2007}$ is not divisible by $n+2$.
 A: We know, $$r^{2m+1}+(n+2-r)^{2m+1}\equiv0\pmod{n+2}$$ for any integer $m\ge0$
Let $r=1,2\cdots,n,n+1 $ and add to get $$T=2\sum_{1\le r\le  n+1}r^{2m+1}\equiv0\pmod{n+2}$$
$$\text{If the given expression } S=\sum_{1\le r\le  n}r^{2m+1}\equiv0\pmod{n+2},$$
$n+2$ will definitely divide $T-2S=2(n+1)^{2m+1}$
Observe that $(n+1,n+2)=1$
A: Hint $\ $ If $\,f(x)\,$ is a integer coefficient polynomial that is odd $\,f(-n) = - f(n),\,$ then
$\begin{eqnarray} \rm mod\ n\!+\!2\!:\ \color{#c00}{n\equiv -2}\ \Rightarrow &&\ f(1)+f(2)+f(3)\cdots+f(\color{#c00}n-1)&+& f(\color{#c00}n)\\ &\equiv&\ f(1)+\color{#0a0}{f(2)}+\color{blue}{f(3)}\cdots+\quad \color{blue}{f(-3)}& +& \color{#0a0}{f(-2)}\end{eqnarray}$
But since $\,f\,$ is odd, $\ \color{#0a0}{f(-2) = -f(2)},\ \color{blue}{f(-3) = f(3)},\ldots$ so summands cancel, leaving $\,\ldots$
Remark $\ $ Here is a similar example from this now deleted question

How to prove that the number $$1^{2015}+2^{2015}+3^{2015}+\cdots+2015^{2015}$$ is divisible by $2015$?

Hint $\ $ If $\,f(x)\,$ is a polynomial with integer coefficients that is odd, i.e. $\,f(-x) = -f(x),\,$ e.g. $\,f(x) = x^{2015},\,$ then $\,f(n)+f(-n) = 0,\,$ so applying Gauss / Wilson reflection
$\qquad\qquad\begin{align}{\rm mod}\,\ 2k\!+\!1\!:\ \  \color{#c00}{2k\equiv -1}&,\ \color{#0a0}{2k\!-\!1\equiv -2},\ldots,\ \ \ \color{#a0f}{k\!+\!1\equiv -k}\\
\Rightarrow\qquad\ \ \ f(1)&\ \ \,+\,\ \ f(2)\  + \cdots + f(k)\\
 +\ f(\color{#c00}{2k})&\!+\!f(\color{#0a0}{2k\!-\!1})+\cdots+f(\color{#a0f}{k\!+\!1})\\[4px]
\equiv\quad f(1)&\ \ \,+\,\ \ f(2)\  + \cdots + f(k)\\
f(\color{#c00}{-1})&\ +\ f(\color{#0a0}{-2})\ +\cdots+f(\color{#a0f}{-k})\\[4px]
\equiv\quad\ \color{#c00}0\quad & \ +\quad  \color{#0a0}0\quad\ \  + \cdots +\ \ \  \color{#a0f}0 
\end{align}$
Note $\ $ Inserting into the sum the term $\,f(0) = 0\,$ then the sum is over the complete system of residues $\, 0,1,2\ldots {2k},\,$ and the reflection method amounts to replacing this by the symmetric system $\, -k,\ldots,-1,0,1,\ldots, k,\,$ where the reflection about the midpoint $\,0\,$ is given simply by negation $\, n \mapsto -n \pmod{2k\!+\!1}.\,$ Such reflection (involution) symmetry is ubiquitous, e.g. at the heart of Wilson's theorem in its various forms.
Above we used standard congruence arithmetic rules, esp. the Polynomial Congruence Rule $\, A\equiv a\,\Rightarrow\,f(A)\equiv f(a)\,$ for any polynomial $\,f(x)\,$ with integer coefficients. In your case we have that $\,f(x) = x^{2015},\,$ which is odd, so the Hint applies.
A: By taking modulo $n + 2$, and partition the terms as groups of two
each,
$$\begin{align*}
1^{2007}+2^{2007}+3^{2007}+\cdots n^{2007} \\
 \equiv1+\big\lfloor 2^{2007}+(n)^{2007}\big\rfloor+\cdots +\cdots \big\lfloor \ \Big(\frac{n+1}{2}\Big)^{2007}+\Big(\frac{n+3}{2}\Big)^{2007}\big\rfloor\\ \equiv1+\big\lfloor 2^{2007}+(-2)^{2007}\big\rfloor+\cdots +\cdots \big\lfloor \ \Big(\frac{n+1}{2}\Big)^{2007}+\Big(-\frac{n+1}{2}\Big)^{2007}\big\rfloor\\ \equiv 1\pmod{n+2}
\end{align*}
$$
Thus, the conclusion is proven
