
Fermat's Thm applied
If gcd(a,35) = 1, show that (mod 35)
the hint in the book says remember, by Femat's thm: (mod 7) and (mod 5)
So since gcd(a,5) = 1 and gcd(a,7) = 1, you can apply Fermat's them  and prove the hint
But thats where I'm stuck  is there another theorem I've forgot where you can multiply the exponent and mod???? is it a property I don't remember??
help!


ok  but how do you show that combined  they are the same as 35 
I understand how and  but how do you put them together?

One can show that: If and , then
Or if you prefer, purely by definitions:
Add the equations to get:
Since (12, 35) = 1, we have: