Divisor of Integer/Examples/3 divides 2^n + (-1)^(n+1)

Theorem
Let $n$ be an integer such that $n \ge 1$.

Then:
 * $3 \divides 2^n + \paren {-1}^{n + 1}$

where $\divides$ indicates divisibility.

Proof
The proof proceeds by induction.

For all $n \in \Z_{\ge 1}$, let $\map P n$ be the proposition:
 * $3 \divides 2^n + \paren {-1}^{n + 1}$

Basis for the Induction
$\map P 1$ is the case:

Thus $\map P 1$ is seen to hold.

This is the basis for the induction.

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

So this is the induction hypothesis:
 * $3 \divides 2^k + \paren {-1}^{k + 1}$

from which it is to be shown that:
 * $3 \divides 2^{k + 1} + \paren {-1}^{k + 2}$

Induction Step
This is the induction step:

Suppose $k$ is integer.

Then $k + 1$ is odd, and:

Similarly suppose $k$ is odd.

Then $k + 1$ is integer, and:

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

Therefore:
 * $\forall n \in \Z_{\ge 1}: 3 \divides 2^n + \paren {-1}^{n + 1}$