Consider and odd prime $p$. For each $i$ at $\{1, 2,..., p-1\}$, let $r_i$ be the rest of $i^p$ when it is divided by $p^2$. Find the sum: $r_1 + r_2 + ... + r_{p-1}$
Source: Mexico Regional Contest 2012-Problem 5
Tags: fermat's little theorem, number theory
Consider and odd prime $p$. For each $i$ at $\{1, 2,..., p-1\}$, let $r_i$ be the rest of $i^p$ when it is divided by $p^2$. Find the sum: $r_1 + r_2 + ... + r_{p-1}$