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!

Let $n=d_0+2d_1+4d_2+\dots+2^kd_k$, where $d_i\in\{0,1\}$, for each $i=0,\dots,k$.
Now, since $n-d_0$ is a multiple of $2$, $\left[\frac{n+1}2\right]=\left[\frac{n-d_0+d_1+1}2\right]=\frac{n-d_0}2+\left[\frac{d_0+1}2\right]$.
But let's have a look at $\left[\frac{d_0+1}2\right]$. If $d_0=0$, we have $[1/2]=0=d_0$. Otherwise, if d_0=1,  we have $[2/2]=[1]=1=d_0$. So in either cases, it is equal to $d_0$.
So, $\left[\frac{n+1}2\right]=\frac{n-d_0}2+d_0$.
Now let's do for $\left[\frac{n+2^{i-1}}{2^i}\right]$, as we know $(n-d_0-\dots-2^{i-1}d_{i-1})$ is a multiple of $2^i$, so 
$$\left[\frac{n+2^{i-1}}{2^i}\right]=\left[\frac{(n-d_0-\dots-2^{i-1}d_{i-1})+d_0+\dots_+2^{i-1}d_{i-1}+2^{i-1}}{2^i}\right]\\
= \frac{n-d_0-\dots-2^{i-1}d_{i-1}}{2^i}+\left[\frac{d_0+\dots_+2^{i-1}d_{i-1}+2^{i-1}}{2^i}\right]\\
= \frac{n-d_0-\dots-2^{i-1}d_{i-1}}{2^i}+\left[\frac{2^{i-1}d_{i-1}+2^{i-1}}{2^i}\right]\\
= \frac{n-d_0-\dots-2^{i-1}d_{i-1}}{2^i}+d_{i-1}$$
so we can add up all these... so we have...
$\frac{n-d_0}2+d_0+\dots+\frac{n-d_0-\dots-2^{i-1}d_{i-1}}{2^i}+d_{i-1}+\dots+\frac{n-d_0-\dots-2^{k-1}d_{k-1}}{2^k}+d_{k-1}+\frac{n-d_0-\dots-2^{k}d_{k}}{2^{k+1}}+d_{k}$
$=\frac{n+d_0}2+\dots+\frac{n-d_0-\dots+2^{i-1}d_{i-1}}{2^i}+\dots+\frac{n-d_0-\dots+2^{k-1}d_{k-1}}{2^k}+\frac{n-d_0-\dots+2^{k}d_{k}}{2^{k+1}}$
$=\frac{2^{k-1}n+2^{k-1}d_0}{2^k}+\dots+\frac{n-d_0-\dots+2^{i-1}d_{i-1}}{2^i}+\dots+\frac{n-d_0-\dots+2^{k-1}d_{k-1}}{2^k}$
$=\frac{(2^{k-1}+\dots+1)n+(2^{k-1}-\dots-1)d_0+\dots+(2^{k-i}-\dots-2^{i-1})d_{i-1}+\dots+2^{k-1}d_k-1}{2^k}=\frac{(2^{k}-1)n+d_0+\dots+2^id_i+\dots 2^kd_k}{2^k}=\frac{(2^k-1)n+n}{2^k}=\frac{(2^k-1+1)n}{2^k}=\frac{(2^k)n}{2^k}=n$
