I have a task that looks like this: "For what $n \geq 0$ is $2^n + 2 \times 3^n$ divisible by $8$?"
I have already solved this and gotten an answer, however there is one thing I can't prove in my solution and its bothering me.
I split up $2^n + 2 \times 3^n$ so that I got the terms separated. $2^n$ and $2\times 3^n$. When I studied what remainders $3^n \pmod 8$ gave I noticed that I got a pattern that goes $3,1,3,1,3,1,3,1..$ and so on. If $n$ was odd I get the remainder $3$ and if $n$ is even I get the remainder $1$.
According to Wolfram Alpha this pattern seems to go on forever. The question is why and how would I prove this? Does it have something to do with the fact that 3 is a prime number? I am quite new to this whole modulus thing...