Problem:
Find the positive integer n nn for which
⌊ 2 1 ⌋ + ⌊ 2 2 ⌋ + ⌊ 2 3 ⌋ + ⋯ + ⌊ 2 n ⌋ = 1994 \left\lfloor\log _{2} 1\right\rfloor+\left\lfloor\log _{2} 2\right\rfloor+\left\lfloor\log _{2} 3\right\rfloor+\cdots+\left\lfloor\log _{2} n\right\rfloor=1994
⌊ log 2 1 ⌋ + ⌊ log 2 2 ⌋ + ⌊ log 2 3 ⌋ + ⋯ + ⌊ log 2 n ⌋ = 1 9 9 4
(For real x , ⌊ x ⌋ x,\lfloor x\rfloorx , ⌊ x ⌋ is the greatest integer ≤ x \leq x≤ x .)
Solution:
Let
S n = ⌊ 2 1 ⌋ + ⌊ 2 2 ⌋ + ⌊ 2 3 ⌋ + ⋯ + ⌊ 2 n ⌋ S_{n}=\left\lfloor\log _{2} 1\right\rfloor+\left\lfloor\log _{2} 2\right\rfloor+\left\lfloor\log _{2} 3\right\rfloor+\cdots+\left\lfloor\log _{2} n\right\rfloor
S n = ⌊ log 2 1 ⌋ + ⌊ log 2 2 ⌋ + ⌊ log 2 3 ⌋ + ⋯ + ⌊ log 2 n ⌋
Note that, for nonnegative integer k kk , there are 2 k 2^{k}2 k positive integers x xx for which ⌊ 2 x ⌋ = k \left\lfloor\log _{2} x\right\rfloor=k⌊ log 2 x ⌋ = k , namely x = 2 k , 2 k + 1 , … , 2 k + 1 − 1 x=2^{k}, 2^{k}+1, \ldots, 2^{k+1}-1x = 2 k , 2 k + 1 , … , 2 k + 1 − 1 . Thus, if r rr is a positive integer,
S 2 r − 1 = 0 + ( 1 + 1 ) + ( 2 + 2 + 2 + 2 ) + ⋯ + ( ( r − 1 ) + ( r − 1 ) + ⋯ + ( r − 1 ) ⏟ 2 r − 1 terms ) S_{2^{r}-1}=0+(1+1)+(2+2+2+2)+\cdots+(\underbrace{(r-1)+(r-1)+\cdots+(r-1)}_{2^{r-1} \text { terms }})
S 2 r − 1 = 0 + ( 1 + 1 ) + ( 2 + 2 + 2 + 2 ) + ⋯ + ( 2 r − 1 terms ( r − 1 ) + ( r − 1 ) + ⋯ + ( r − 1 ) )
The right side of this expression has
2 r − 2 1 terms ≥ 1 2 r − 2 2 terms ≥ 2 2 r − 2 3 terms ≥ 3 2 r − 2 r − 2 terms ≥ r − 2 2 r − 2 r − 1 terms = r − 1. \begin{gathered}
2^{r}-2^{1} \text { terms } \geq 1 \\
2^{r}-2^{2} \text { terms } \geq 2 \\
2^{r}-2^{3} \text { terms } \geq 3 \\
\vdots \\
2^{r}-2^{r-2} \text { terms } \geq r-2 \\
2^{r}-2^{r-1} \text { terms }=r-1.
\end{gathered}
2 r − 2 1 terms ≥ 1 2 r − 2 2 terms ≥ 2 2 r − 2 3 terms ≥ 3 ⋮ 2 r − 2 r − 2 terms ≥ r − 2 2 r − 2 r − 1 terms = r − 1 .
It follows that
S 2 r − 1 = ( 2 r − 2 1 ) + ( 2 r − 2 2 ) + ( 2 r − 2 3 ) + ⋯ + ( 2 r − 2 r − 1 ) = ( r − 1 ) 2 r − ( 2 r − 2 ) = ( r − 2 ) 2 r + 2 \begin{aligned}
S_{2^{r}-1} &=\left(2^{r}-2^{1}\right)+\left(2^{r}-2^{2}\right)+\left(2^{r}-2^{3}\right)+\cdots+\left(2^{r}-2^{r-1}\right) \\
&=(r-1) 2^{r}-\left(2^{r}-2\right) \\
&=(r-2) 2^{r}+2
\end{aligned}
S 2 r − 1 = ( 2 r − 2 1 ) + ( 2 r − 2 2 ) + ( 2 r − 2 3 ) + ⋯ + ( 2 r − 2 r − 1 ) = ( r − 1 ) 2 r − ( 2 r − 2 ) = ( r − 2 ) 2 r + 2
Taking r = 8 r=8r = 8 in this last equation we obtain S 255 = 1538 < 1994 S_{255}=1538<1994S 2 5 5 = 1 5 3 8 < 1 9 9 4 . Setting r = 9 r=9r = 9 we find S 511 = 3586 > 1994 S_{511}=3586>1994S 5 1 1 = 3 5 8 6 > 1 9 9 4 . Hence, if S n = 1994 S_{n}=1994S n = 1 9 9 4 , then 255 = 2 8 − 1 < n < 2 9 − 1 255=2^{8}-1<n<2^{9}-12 5 5 = 2 8 − 1 < n < 2 9 − 1 . Therefore
1994 = S n = S 255 + ( n − 255 ) 8 = 8 n − 502 1994=S_{n}=S_{255}+(n-255) 8=8 n-502
1 9 9 4 = S n = S 2 5 5 + ( n − 2 5 5 ) 8 = 8 n − 5 0 2
and this yields n = 312 n=\boxed{312}n = 3 1 2 .
The problems on this page are the property of the MAA's American Mathematics Competitions