How many $n$-digit sequences of $0,1 \ \text{or} \ 2$s contain an odd numbers of $0$s? Problem : There are $3^n$ n-digit sequences in which each digit is $0$, $1$ or $2$. How many of these sequences have an odd number of $0$'s ?
Let $o(n)$ = the number of n-digit sequences which have an odd number of $0$'s and
$e(n)$ = the number of n-digit sequences which have an even number of $0$'s.
Obviously $o(n) + e(n) = 3^n$ and by examples I can see that $o(n)=e(n)-1$ but I don't know how to show this.
Moreover if we have $x$ digits to choose from then by examples I see that $o(n) = e(n) - {n}^{x-2}$. And if we consider the number of sequences which have a number congruent to $0$, $1$ respectively $2$ (modulo $3$) of $0$s we see that these numbers are in arithmetic progression.
Can someone prove these assumptions to me or disprove them if they are not right?  

Assume that $n$ is odd, $n = 2s+1$
Note that number of $n$-digit sequences with $k$ number of zeroes is ${N_k}(n) =$ $n \choose k$$2^{n-k}$.
Thus, $$o(n) = \sum_{m=0}^s{N_{2m+1}}(n) = \sum_{m=0}^s{n \choose 2m+1}{2^{n-2m-1}} = \sum_{m=0}^s{n \choose 2m+1}{1^{2m+1} 2^{n-2m-1}} \\ = \frac{(2+1)^n-(2-1)^n}{2} = \frac{3^n-1}{2}$$
If $n$ is even, let $n = 2t$. Then $o(n) = \sum_{m=0}^{t-1}{n \choose 2m+1}{2^{n-2m-1}} = \frac{3^n-1}{2}$, and you are done.
Moreover, $$o(n-1) = \frac{3^{n-1}-1}{2} \implies \fbox{$o(n-1) + 3^{n-1} = o(n)$}$$
Similarly, for $e(n)$, $$e(n)=\begin{cases}{\sum_{m=0}^s{n \choose 2m}{2^{n-2m}}}&n=2s+1 \\ \sum_{m=0}^t{n \choose 2m}{2^{n-2m}}& n = 2t\end{cases}$$
Thus, $$e(n) = \frac{(2+1)^n+(2-1)^n}{2} = \frac{3^n+1}{2}$$
Now, by further computation, one can find out that $\fbox{$e(n)-o(n) = 1$}$.
