Show that $2^n - (-1)^n$ is divisible by 3 for all positive integers n
I tried:
let $n = 2k$ (Even numbers)
$n = 2k + 1$ (odd numbers)
but also, I didn't find the solution.
Show that $2^n - (-1)^n$ is divisible by 3 for all positive integers n
I tried:
let $n = 2k$ (Even numbers)
$n = 2k + 1$ (odd numbers)
but also, I didn't find the solution.
Using Modular_arithmetic,
For $n = 2k$, $$2^n - (-1)^n=4^k-1$$
Since $4^k \equiv 1 \quad\text{(mod 3)}$, $$2^n - (-1)^n\equiv 1-1\equiv 0 \quad\text{(mod 3)}$$
So $2^n - (-1)^n$ is divisible by 3 for $n = 2k$.
Leave another case for you.
In general, we have $$a^n - b^n = (a - b) (a^{n-1} + a^{n-2}b + a^{n-3}b^2 + \dots + b^{n-1}).$$ Hence, $$2^n - (-1)^n=3\times \text{something}.$$
Use $(x^n-a^n) =(x-a) f(x, a)$, then $(2^n-(-1)^n) =(2--1)N=3N.$
The case is clear for $n=1$.
Suppose $2^n - (-1)^n$ is a multiple of $3$, say $3m$.
Then
\begin{align}
2^{n+1} - (-1)^{n+1}
&= 2\cdot 2^n + (-1)^n \\
&= 2(2^n - (-1)^n) + 2(-1)^n +(-1)^n\\
&= 2(3m) + 3(-1)^n.
\end{align}
I suppose you can reach a conclusion now.
$$2^n-(-1)^n=3m$$
Let $n=2k$
$2^n-(-1)^n=2^{2k}-(-1)^{2k}=2^{2k}-1=(2^k-1)(2^k+1)$
Since an integer is one of these forms $3t-1, 3t$ or $3t+1$ and a positive integer power of $2$ is not a multiple of $3$ then it must be one of the forms $3k-1$ or $3k+1$ and $(2^k-1)(2^k+1)$ is a multiple of $3$
Let $n=2k+1$
$2^n-(-1)^n=2^{2k+1}-(-1)^{2k+1}=2^{2k+1}+1=$
$=(2+1)(2^{2k} - a^{2k-1} + \ldots + 1)=$
$=3\times (2^{2k} - a^{2k-1} + \ldots - 2 + 1)$
In both cases $2^n-(-1)^n$ is a multiple of $3$.