Proof by mathematical induction of a recursion equation
The recursion equation for the problem:
A "codeword" from alphabet {0,1,2,3} is said to be "legitimate" if it contains an even number of zeros. Thus for instance, the codeword 31010 is legitimate whereas 01010 is not. How many n-letter codewords are legitimate ?
is N(n) = 2^(2n-1) + 2^(n-1)
Can some one help me with proving N(n) by mathematical induction ?
I know that the first step is to show that N(1) is true.
So if I plug in n=1 in the equation above the answer is three and it is true becasue legitimate codewords that are 1-letter long are {1},{2} and {3} and therefore there are three.
I think the next step is to assume that N(n) is true and then to see whether or not N(n+1) is true by plugging in n+1 for n in the recursion equation above.
Thanks in advance (Itwasntme)