Congruence Modulo 3 of Power of 2

Theorem
Let $n \in \Z_{\ge 0}$ be a positive integer.

Then:
 * $2^n \equiv \left({-1}\right)^n \pmod 3$

That is:
 * $\exists q \in \Z: 2^n = 3 q + \left({-1}\right)^n$

Proof
The proof proceeds by induction.

For all $n \in \Z_{\ge 0}$, let $P \left({n}\right)$ be the proposition:
 * $2^n \equiv \left({-1}\right)^n \pmod 3$

$P \left({0}\right)$ is the case:

Thus $P \left({0}\right)$ is seen to hold.

Basis for the Induction
$P \left({1}\right)$ is the case:

Thus $P \left({1}\right)$ is seen to hold.

This is the basis for the induction.

Induction Hypothesis
Now it needs to be shown that, if $P \left({k}\right)$ is true, where $k \ge 2$, then it logically follows that $P \left({k + 1}\right)$ is true.

So this is the induction hypothesis:
 * $2^k \equiv \left({-1}\right)^k \pmod 3$

from which it is to be shown that:
 * $2^{k + 1} \equiv \left({-1}\right)^{k + 1} \pmod 3$

Induction Step
This is the induction step:

If $k$ is odd, this means:

If $k$ is odd, this means:

So $P \left({k}\right) \implies P \left({k + 1}\right)$ and the result follows by the Principle of Mathematical Induction.

Therefore:
 * $\forall n \in \Z_{\ge 0}: 2^n \equiv \left({-1}\right)^n \pmod 3$

[[Category:2]] [[Category:3]]