253. Powers of two. Calculate the sum

$$
2+2^{2}+2^{3}+2^{4}+\cdots+2^{n}
$$
253. In the binary numeral system, our sum is written using $n$ ones, to which one 0 is appended. If we add two ones to the sum, we get a number that is written in the binary system using one 1, followed by $n+1$ zeros. Therefore, the given sum is equal to $2^{n+1}-2$.