Question 138
Pick a random integer between $0$ and $4095$, inclusive. Write it in base $2$ (without any leading zeroes). What is the expected number of consecutive digits that are not the same (that is, the expected number of occurrences of either $01$ or $10$ in the base $2$ representation)?