Prove that $2^n+(-1)^{n+1}$ is divisible by 3.

1k Views Asked by At

Prove that $2^n+(-1)^{n+1}$ is divisible by 3 for $n\in\mathbb{N}$.

My attempt:

For $n=1$:

$2^1+(-1)^2 = 2 + 1 = 3, 3 |3$

We assume that $3|(2^n+(-1)^{n+1})$

Then for $n+1$:

$2^{n+1} + (-1)^{n+2} = 2\cdot 2^n -(-1)^{n+1}$

I am trying to show that for $n+1$, the expression is a constant multiple of the case for $n$ plus or minus a multiple of $3$. However, the minus sine I pulled out of the alternating term is tripping me up. Am I going about this the right way?

2

There are 2 best solutions below

0
On BEST ANSWER

If $n=1$, then $2^{n} + (-1)^{n+1} = 3$, which is divisible by $3$; if $n \geq 1$ such that $2^{n} + (-1)^{n+1} = 3q$ for some integer $q \geq 1$, then $$ 2^{n+1} + (-1)^{n+2} = 2[ 3q - (-1)^{n+1} ] + (-1)^{n+2} = 6q + 2(-1)^{n+2} + (-1)^{n+2} = 6q + 3(-1)^{n+2}, $$ which is again divislble by $3$.

1
On

We have: $2^n = (-1)^n \pmod 3$, and $(-1)^n + (-1)^{n+1} = 0 \pmod 3$, the result follows.