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?
2026-04-01 05:07:58.1775020078
The sum of powers of $2$ that are less than or equal to $n$ is less than $2n$.
54 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
3
hint
$$2^0+2^1+...+2^p=2.2^p-1<2\cdot 2^p$$
if $2^p\le n$, then the sum is $<2n$.
For example, take $n=9$ then $p=3$.
$$2^0+2^1+2^2+2^3=15<18.$$