New query about question "The remainder when $8^{12}-2$ is divided by $7$ is..." [158]

https://www.gregmat.com/problems/quant?problem=the-remainder-when-812-2-is-divided-by-7-is


Is it possible to do this by finding the remainder pattern for 8^x-2?

E.g.

(8^1 -2) mod 7 = 6

(8^2 -2) mod 7 = 6

The cycle repeats immediately (cycle length 1) so all remainders will be 6.

Yes, it’s because 8 \equiv 1 \pmod 7, so
8^n \equiv 1^n \equiv 1 \pmod 7.

Hence, (8^n - 2) \equiv 1-2 \equiv 6 \pmod 7