Series $f(p)$ is a multiple of $p$ I would appreciate if somebody could help me with the following problem
Q: How to proof (using combinatorial proof)
Let $f(p)(p>2\text{: prime number})$ ;
$$f(p)=1^p+2^p+3^p+\cdots+(p-1)^p$$
then $f(p)$ is a multiple of $p$
 A: There exists an easy algebraic / number theoretic proof for $p$ being an odd number. This solution is a combinatorial approach for $p$ being a prime number. (I would like to see an approach where $p$ is any odd number.)
A (naive) understanding of $i^p$, is that it is the number of functions from $[p] = \{ 1, 2, \ldots, p\}$ to $[i] = \{ 1, 2, \ldots , i \}$. Thus, we take the interpretation that the quantity in question is simply the number of functions (counted with repetition) from $[p]$ to $[i]$ as $i$ ranges from 1 to $p-1$.
Given any non-constant function from $[p]$ to $[i]$, there is a clear bijection with $p$ functions (inclusive of itself), by applying the shift function successively. This uses the fact that $p$ is prime. Hence, the number of such functions is a multiple of $p$.
It remains to count the number of constant functions from $[p]$ to $[i]$. There are clearly $i$ of them. Hence, the total number of constant functions is
$$1 + 2 + \ldots + (p-1) = \frac{p(p-1)}{2}$$
Now, since $p$ is odd,this number is a multiple of $p$.
Thus, $ \sum_{i=1}^{p-1} i^p$ is a multiple of $p$.
A: It works for all ODD integer p , not just primes. Let p be an odd positive integer, not necessarily prime. To see this write in reverse ,
$$f(p) = (p-1)^p + (p-2)^p + (p-3)^p + ... + 3^p + 2^p + 1^p$$
$$ \\ f(p) = (pq_1-1^p)+(pq_2-2^p)+ ...+(pq_{ \frac{p-1}{2}} - (\frac{p-1}{2})^p) + ( \frac{p-1}{2})^p + ... + 2^p + 1^p $$
In other words f(p) will have an even number of terms and every non multiple of p cancels nicely.
