Introduce an auxiliary variable: let $b_n$ be the number of ternary sequences of length $n$ that do not contain a $2$. If a sequence of length $n$ contains a $2$, you can append a $0$ or a $2$; if it does not contain a $2$, you can append a $0$, a $1$, or a $2$. In particular, you can always append a $0$ or a $2$, and if it does not contain a $2$, you can also append a $1$. Thus,
$$a_{n+1}=2a_n+b_n\;.$$
Clearly $b_{n+1}=2b_n$, and in fact it’s not hard to see that $b_n=2^n$: you’re just counting binary strings of length $n$. Thus, $$a_{n+1}=2a_n+2^n\;.$$
I’ll leave the solution to you for now.
This is very closed to De Bruijn sequences.
Let's call $A$ your alphabet (for decimal numbers $A=\{0,\ldots,9\}$) and $n$ the length of the contained sequences. We look for sequences containing all elements as (possibly) cyclic substring.
Consider the digraph $G = (V,E)$, where:
$$V=A^{n-1}$$
$$E=\{((u_1, \ldots, u_{n-1}), (u_2, \ldots, u_{n-1}, v)), (u_1,\ldots, u_{n-1},v \in A^n\}$$
Then sequences containing all elements of $A^n$ as substring are exactly walks in $G$ going through every edge.
Each node has an in and out degree of $|A|$, so this graph has an Eulerian cycle, which leads to a sequence of length $|A|^n$ minimal possible.
If we delete the cycle, the same graph still works. However, the minimal length we get is now the cost of writing the $n-1$ first letters plus the $|E|$ edges, i.e. $n-1+|A|^n$. For $n=4$, $A=\{0,\ldots,9\}$, we get $10003$.
Best Answer
If the number of 0's in the first n digits are equal to the number of 1's in the last n digits, that also means that the number of 0's and 1's are equal in the 2n-digit binary sequence. That would mean the total number of binary sequences with n 0's and n 1's would be $\binom{2n}{n}$.