We are given $2^n$ numbers: $1,2,...,2^n$ ($n$ is integer). Then repeat $n$ times the following process: split those numbers in half and flip a coin with $p$ probability for heads. If the result for a half is tails we ignore that certain half otherwise we proceed. For example: if $n=2$ then we have the numbers $1$, $2$, $3$, $4$. We flip the coin $2$ times and let's suppose the result is $T$, $H$. So now we are dealing with $3$, $4$. We flip again the coin $2$ times so if the result is $H$, $T$ then only $3$ remains. How many numbers remain in average in this experiment?
I have calculated that in average $2^n p^n$ numbers remain. Is it correct?