A decimal code is declared legal if it has an even number of zeros$.$ For example $1900200$ is a legal code, but $10002$ is not. Let $a_n$ be the number of legal decimal codes of length $'n'$. Then
(A) $a_n=8a_{n-1}+10^{n-1}$
(B)$a_n=\frac{8^n+10^n}{2}$
(C) $a_n=9a_{n-1}+10^n$
(D)$a_n=9^n+10^n$
Answer given are the options (A) and (B)
My Attempt We can create the n digit specified code by placing any non-zero digit after unit's place in $(n-1)$ legal code. Also, we can place a zero in any one of the illegal codes.
$a_n=a_{n-1}\times 9+(10^{n-1}-a_{n-1})\times 1=8a_{n-1}+10^{n-1}$
But how to get option (B).
Is there a way independent of using above recursion.