How many binary numbers of length $n$ can be generated where $n > 7$ and the number either start with $000$ or end with $111$?
My questions is, can I choose an $n$ randomly? For example, let's say that $n = 8$. Since the first three terms need to be $0$, they can have only one option and the remaining five digits can be $0$s or $1$s meaning that they have two options. The same identity applies for the ending with $111$ case.
So my guess is, $2^5+2^5 = 32+32 = 64$
Is this answer correct? By the way forgive me if I couldn't explained my answer clearly, thanks..