A simple calculation will prove that this problem is true for n=2,3,5. Now let n be an integer (not divisible by 30 - otherwise the problem is trivial). Then gcd(n,30)=1,2,3,5,6,10,15. If the gcd = 1 then that is the case above. If gcd = 2 then it mean we can write n=2m where gcd(m,30)=1. But this means n^21 = (2m)^21 = 2^21 * n^21 = 1 (mod 30). The situation is similar if gcd = 3 or 5 because we proved this special cases. Say that gcd = 6. Then we can write n = 2*3*m where gcd(m,30)=1. But then n^21 = 2^21 * 3^21 * m^21 = 1 (mod 30). The same situation if gcd = 10 because then we could write n=2*5*m. And repeat the argument.