Problem: What is the remainder of $a^{72} \mod 35$ if $a$ is a whole number not having $5$ or $7$ as divisors. I have the following problem:
Problem: What is the remainder of $a^{72} \mod 35$ if $a$ is a whole number not having $5$ or $7$ as divisors.
If $a$ cannot be divided by $5$ or $7$ it cannot be divided by $35$, so the remainder is not $0$.
However the remainder can be everything between $1$ and $34$ excluding numbers divisible by $5$ or $7$ ? 
Thanks for your time.

HINT:
Using Carmichael function, $\lambda(35)=12$
If $(a,7)=(a,5)=1\implies (a,35)=1\implies a^{12}\equiv1\pmod{35}$
