Compute $2^{287} \pmod 6$.
So I have been using the technique of finding the pattern in modulus to make computing high powers in modulus easier.
For example $4^{128} \pmod {13}$ pattern length is 6, or when the modulus numbers will start to repeat. Since $6 x 21 + 2 = 128$, I can take $(4^6)^{21} \cdot (4^2)$ and come out with an equivalence relation of $3 \pmod{13}$.
For this particular example however, the remainder of all powers of 2 in modulus 6 are 2. Thus the pattern length is 1 and I'm hitting a roadblock in solving this. Is there a different approach or am I thinking about this wrong?
Thank you for your help.
We can see that the powers of $2$ have this pattern: $2^1 \equiv 2$, $2^2 \equiv -2$, $2^3 \equiv 2$, and thus we start again. In conlusion odd powers are equivalent to $2$ and even powers are equivalent to $-2 \equiv 4$. We conclude $$2^{287} \equiv 2 (mod 6).$$
Otherwise you can see that $2^{287}$ must be even so it can be $0,2,4$, but it can't be $0$ cause it is not divisible by $3$. Now we can show that $2^{287}-4$ is not divisible by $3$ and conclude against $4$: $$2^{287}-4 \equiv(-1)^{287}-1\equiv-2\not = 0 (mod 3).$$