Need to prove this modular arithmetic theorem

135 Views Asked by At

if $2^7 \equiv 2 \mod n$ and $3^7 \equiv 3 \mod n$, then $a^7 \equiv a \mod n$.

I know Chines remainder and Eulers theorem but can't figure out how to proof this.