<s>[INST] Prove that $\lfloor\frac{n+1}{2}\rfloor+\lfloor\frac{n+2}{4}\rfloor+\lfloor\frac{n+4}{8}\rfloor+\lfloor\frac{n+8}{16}\rfloor+ \dots=n$ 
Prove $$\left[\dfrac{n+1}{2}\right]+\left[\dfrac{n+2}{4}\right]+\left[\dfrac{n+4}{8}\right]+\left[\dfrac{n+8}{16}\right] + \dots=n$$ 
  where $[x]=\lfloor x\rfloor$

$$$$
It was suggested that somehow I use the identity $[x]=\left[\dfrac x2\right]+\left[\dfrac{x+1}{2}\right]$$$$$After struggling for a while, I realised I wasn't getting anywhere using his hint, probably because I couldn't really understand how I was to use it. Instead I tried to use the Squeeze Theorem by rewriting the $nth$ term of the series (referred to later as S) as$$$$ $$t_n=\left[\dfrac{n+2^k}{2^{k+1}}\right] \text{ where } 0\le k<\infty$$
$$\Rightarrow \dfrac{n+2^k}{2^{k+1}}-1<\left[\dfrac{n+2^k}{2^{k+1}}\right]\le \dfrac{n+2^k}{2^{k+1}}$$
$$$$
$$ \lim_{k\to \infty}(k+1)\left(\dfrac{n+2^k}{2^{k+1}}-1\right)<S\le  \lim_{k\to \infty}(k+1)\left( \dfrac{n+2^k}{2^{k+1}}\right)$$
However these bounds are too loose as the limits diverge to $-\infty$ and $\infty$ respectively.
$$$$
Could somebody please show me how to prove the series is equal to $n$, either through the given hint, or through the selection of tighter bounds for the Squeeze Theorem? Many thanks!
 [/INST] Lets think binary, and instead of $n$, lets write (abcd) where $a$, $b$, $c$, and  $d$ are its digits, a.k.a. bits. Here w.l.o.g. we supposed $n$ is 4 bit long.
$\lfloor\frac{abcd+1}{10}\rfloor+\lfloor\frac{abcd+10}{100}\rfloor+\lfloor\frac{abcd+100}{1000}\rfloor+\lfloor\frac{abcd+1000}{10000}\rfloor+\lfloor\frac{abcd+10000}{100000}\rfloor+\dots$
$=\lfloor\frac{abc0+d+1}{10}\rfloor+\lfloor\frac{ab00+cd+10}{100}\rfloor+\lfloor\frac{a000+bcd+100}{1000}\rfloor+\lfloor\frac{abcd+1000}{10000}\rfloor+\lfloor\frac{abcd+10000}{100000}\rfloor+\dots$
$=abc+\lfloor\frac{d+1}{10}\rfloor+ab+\lfloor\frac{cd+10}{100}\rfloor+a+\lfloor\frac{bcd+100}{1000}\rfloor+\lfloor\frac{abcd+1000}{10000}\rfloor+\lfloor\frac{abcd+10000}{100000}\rfloor+\dots$
$=abc+d+ab+c+a+b+a+0+\dots=abc+d+ab+c+a+b+a$
$=abc+d+ab+c+(a+b+a)=abc+d+ab+c+(a0+b)$
$=abc+d+ab+c+ab$
$=abc+d+(ab+c+ab)=abc+d+abc=abc$. ☺
</s>