2. Find the value of $\sum_{k=3}^{1000}\left\lfloor\log _{2} k\right\rfloor$.
2. Answer: 7986
Solution. Note that $2^{k+1}-2^{k}=2^{k}$, and that $2^{k} \leq t<2^{k+1}$ if and only if $\left\lfloor\log _{2} t\right\rfloor=k$. Then the requires sum (denoted by $S$ ) can be obtained by
$$
\begin{aligned}
S & =\sum_{k=2}^{9} \sum_{2^{k} \leq t<2^{k+1}}\left\lfloor\log _{2} t\right\rfloor+\left\lfloor\log _{2} 3\right\rfloor-\sum_{t=1001}^{1023}\left\lfloor\log _{2} t\right\rfloor \\
& =\left(\sum_{k=2}^{9} k 2^{k}\right)+1-\sum_{t=1001}^{1023} 9 \\
& =8192+1-23(9)=7986
\end{aligned}
$$