<s>[INST] (AIME 1994) $ \lfloor \log_2 1 \rfloor + \lfloor \log_2 2 \rfloor + \ldots + \lfloor \log_2 n \rfloor = 1994 $ 
$($AIME $1994)$ Find the positive integer $n$ for which
$$ \lfloor \log_2 1 \rfloor + \lfloor \log_2 2 \rfloor + \lfloor \log_2 3 \rfloor  + \ldots + \lfloor \log_2 n \rfloor  = 1994 $$ where $\lfloor x \rfloor$ denotes the greatest integer less than or equal to $x$.

The first few terms of this series shows me that summation $\lfloor \log_2 n \rfloor$ for $n=1$ to $n=10$ give $2^{n +1}$.
 [/INST] $$ \lfloor \log_2 1 \rfloor + \lfloor \log_2 2 \rfloor + \lfloor \log_2 3 \rfloor  + \ldots + \lfloor \log_2 n \rfloor  = 1994 $$
Let $f(k)=\lfloor\log_2k\rfloor$. Since $\log$ is increasing we know that

*

*$f(2^0)=f(1)=0$

*$f(2^1)=f(2)=f(3)=1$

*$f(2^2)=f(4)=f(5)=f(6)=f(7)=2$

*$f(2^3)=f(8)=f(9)=\cdots=f(15)=3$

*$f(2^4)=f(16)=f(17)=\cdots=f(31)=4$

*etc.

So there are 2 ones, 4 twos, 8 threes, 16 fours, 32 fives, 64 sixes, 128 sevens, 256 eights, etc. We can multiply these to form the sequence $(2,8,24,64,160,384,896,2048)$. Summing the first 7 terms of this sequence gives $1538$, so we're missing $1994-1538=456$. Since $456/8=57<2048$ then our $n$ should be $2+4+8+16+32+64+128+57=311$, but we must also account for the $f(1)=0$ term, so in fact $n=312$.
</s>