Other than just observing the pattern that 6 to odd powers mod 7 is 6 and 6 to even powers mod 7 is 1, how would one find out? I assume it has something to do with the prime divisors 2 and 3, but I'm not sure what.
Who's theorems or lemmas should I read?
HINT
Note that
$$6 \equiv -1 \pmod 7$$
and
$$(-1)^{2n}\neq (-1)^{2n+1}$$