The sum of powers of $2$ that are less than or equal to $n$ is less than $2n$. I am working with an amortised analysis problem where the given solution states that
$$\sum\{2^k:0<2^k\le n\}<2n$$
I am not mathematically literate; is there a simple way to prove this or at least calculate said sum?

If $k = \lfloor \log n \rfloor$ then you would like to prove that
$$
\sum_{i=0}^k 2^i < 2n
$$
Note that by summing the geometric series,
$$
\sum_{i=0}^k 2^i = \frac{2^{k+1}-1}{2-1} = 2\cdot 2^k - 1 = 2 \cdot 2^{\lfloor \log n \rfloor}-1 < 2n-1 < 2n.
$$
