<s>[INST] Show that $7 \mid( 1^{47} +2^{47}+3^{47}+4^{47}+5^{47}+6^{47})$ I am solving this one using the fermat's little theorem but I got stuck up with some manipulations and there is no way I could tell that the residue of the sum of each term is still divisible by $7$. what could be a better approach or am I on the right track? Thanks
 [/INST] One more solution.
By Fermat's Little Theorem,
$a^{p - 1} \equiv 1 \pmod{p}$ for $a \not\equiv 0$.  Thus,
$$
a^{48} = \left(a^6\right)^8 \equiv 1^8 = 1 \pmod{7}
$$
for each $a \in \{1, 2, \ldots, 6\}$.
As a consequence, $a^{47} \equiv a^{-1}$, so
$$
\begin{align}
1^{47} + 2^{47} + 3^{47} + 4^{47} + 5^{47} + 6^{47} &\equiv 1^{-1} + 2^{-1} + 3^{-1} + 4^{-1} + 5^{-1} + 6^{-1} \\
&\equiv 1 + 4 + 5 + 2 + 3 + 6 \\
&\equiv 0 \pmod{7}.
\end{align}
$$
</s>