# Show that $1439^2 | \sum_{k=1}^{1439}k^{1439}$

I couldn't show that $1439^2 | \sum_{k=1}^{1439}k^{1439}$ But i showed that $1439 | \sum_{k=1}^{1439}k^{1439}$ maybe it can help.
We can easily prove that 1439 is a prime number .
According to Fermat's little theorem : $k^{1439}\equiv k\pmod{1439}$
Then , $\sum_{k=1}^{1439}k^{1439}\equiv \sum_{k=1}^{1439}k\pmod{1439}$
And it is commonly known that $\sum_{k=1}^{1439}k=\frac{1439\cdot 1440}{2}$
We can deduce that $\sum_{k=1}^{1439}k^{1439}\equiv 0 \pmod{1439}$
I hope so gonna help me out !

• @hlf So does I. What we can say about $a^p+b^p\equiv ? ($mod $p^2)$ such that $a+b=p$. – 1ENİGMA1 Feb 2 '18 at 13:30
• This is true for all odd numbers. – orlp Feb 2 '18 at 13:31
• I think it can be solved by thinking $1^{1439}+1438^{1439}\equiv$ ? (mod $1439^2$) – 1ENİGMA1 Feb 2 '18 at 13:33

This is true for every odd number $n$, not just $1439$.
Indeed, pair the terms of the sum $S=\sum_{k=0}^{n} k^n$ as $a^n$ and $(n-a)^n$.
Now, $$(n-a)^n = n^n - n n^{n-1} a+ \binom{n}{2} n^{n-2} a^2 - \cdots - \binom{n}{2} n^2 a^{n-2} + n n a^{n-1} - a^n \equiv - a^n \bmod n^2$$
Hence, $S \equiv 0 \bmod n^2$.
• It seems to hold for all odd $n$, not just prime. – orlp Feb 2 '18 at 13:45
• To go even further, $$f(n) = \frac{1}{n^2}\sum_{k=1}^n(k^n \bmod n^2) \overset ?= \frac{1}{2}(n-1)$$, which holds for all odd $n$ except $n$ divisible by a square, strangely enough. – orlp Feb 2 '18 at 14:18