1

Find all $n>1$ such that $1^{n} + 2^{n} + 3^{n} +\cdots + (n-1)^{n}$ divisible by $n$. I'm not good at Number Theory so , give elementary answer.

mnulb
  • 3,381

1 Answers1

3

If $n=2k+1$ is odd $$\sum_{i=1}^{n-1} i^n=\sum_{i=1}^{k} i^n+(n-i)^n$$ and $i^n+(-i)^n\equiv 0\pmod{n}$. So, the claim holds for odd $n$.

So, suppose $n$ is even. Let $n=2^kl$, where $l$ is odd. Then, as $\phi(2^k)=2^{k-1}|n$, all the odd terms are congruent to $1\bmod{2^k}$. However, $n\ge 2^k\ge k$ implies $2^k$ divides the even terms. So, the whole sum is congruent to $n/2$ modulo $2^k$, i.e. not divisible by $2^k$. Thus, it is not divisible by $n$.

Emre
  • 3,962