Understanding how to compute $5^{15}\pmod 7$ 
Compute $5^{15} \pmod 7$.

Can someone help me understand how to solve this? I know there is a trick, but my professor did not completely explain it in class and I'm stuck.

$5^3=125, 5^3= 2$ mod 7, $5^3*5^3= 2*2$ mod 7, so $5^{15}=2^5$ mod 7=1 mod 7. sorry about the equivalent sign, i don't remember the code.
