Can someone help me to find a counter example that shows that $a \equiv b \mod m$ does not imply $(a+b)^m \equiv a^m +b^m \mod m$ Can someone help me to find a counter example that shows that $a \equiv b \mod m$ does not imply $(a+b)^m \equiv a^m +b^m \mod m$. I have tried many different values but I can't seem to find one. I tried to prove it but I also cannot do it. Thanks.

Take $a=1$, $b=2$ and $m=6$.
$(a+b)^6 = a^6 + 6 a^5 b + 15 a^4 b^2 + 20 a^3 b^3 + 15 a^2 b^4 + 6 a b^5 + b^6$
$(a+b)^6 \equiv  a^6 - a^3 b^3 + b^6 \bmod 3$
If $(a+b)^6 \equiv a^6 + b^6 \bmod 6$, then $3$ must divide $a$ or $b$.
It is enough to take $a=1$ and $b=2$ to have  $(a+b)^6 \not\equiv  a^6 + b^6 \bmod 6$.
In general, $(a+b)^6 \equiv a^6 + b^6 \bmod 6$ iff $2$ divides $ab(a+b)$ and $3$ divides $ab$.
