<s>[INST] Find the number of solutions to $ \lfloor x \rfloor + \lfloor 2x \rfloor + \lfloor 4x \rfloor + \ldots + \lfloor 32x \rfloor =12345$ 
Find the number of solutions of the equation 
  $$\lfloor x \rfloor + \lfloor 2x \rfloor + \lfloor 4x \rfloor + \lfloor 8x \rfloor + \lfloor 16x \rfloor + \lfloor 32x \rfloor =12345,$$
  where $\lfloor\,\cdot\,\rfloor$ represents the floor function.

My work:
I use the fact that
$$\lfloor nx \rfloor =\sum_{k=0}^{n-1} \left\lfloor x +\frac kn \right\rfloor.$$
So the equation becomes
$$\lfloor x \rfloor +\sum_{k=0}^{1} \left\lfloor x +\frac k2 \right\rfloor +\sum_{k=0}^{3} \left\lfloor x +\frac k4 \right\rfloor +\sum_{k=0}^{7} \left\lfloor x +\frac k8 \right\rfloor   \\
\qquad {}+\sum_{k=0}^{15} \left\lfloor x +\frac k{16} \right\rfloor +\sum_{k=0}^{31} \left\lfloor x+\frac k{32} \right\rfloor   \\
= \lfloor x \rfloor + \left\lfloor x+\frac 12 \right\rfloor + \left\lfloor x+\frac 64 \right\rfloor + \left\lfloor x+\frac{28}{8} \right\rfloor   \\
\qquad {}+ \left\lfloor x+\frac{120}{16} \right\rfloor + \left\lfloor x+\frac{496}{32} \right\rfloor$$
What should I do next?
 [/INST] Alt. solution: Write the fractional part of $x$ in binary:
$$
x = n + 0.b_1 b_2 b_3 \ldots = n + \sum_{i=1}^\infty \frac{b_i}{2^i},
$$
where $n \in \mathbb{Z}$ and $b_i \in \{0,1\}$.
Also give your function $\mathbb{R} \to \mathbb{R}$ a name:
$$
f(x) = \lfloor x \rfloor + \lfloor 2x \rfloor + \lfloor 4x \rfloor + \lfloor 8x \rfloor + \lfloor 16x \rfloor + \lfloor 32x \rfloor 
$$
Then
\begin{align*}
f(x)
&= \lfloor x \rfloor + \lfloor 2x \rfloor + \lfloor 4x \rfloor + \lfloor 8x \rfloor + \lfloor 16x \rfloor + \lfloor 32x \rfloor \\
&= n + (2n + b_1) + (4n + 2b_1 + b_2) + \cdots + (32n + 16b_1 + 8b_2 + 4b_3 + 2b_4 + b_5) \\
&= 63n + 31b_1 + 15b_2 + 7b_3 + 3b_4 + b_5.
\end{align*}
We can choose $b_i \in \{0,1\}$ arbitrarily,
so it follows that the image of $f$ is exactly
the set of integers whose remainder is between $0$ and $31 + 15 + 7 + 3 + 1 = 57$, mod $63$.
In particular, $12345 \equiv 60 \pmod{63}$, so $12345$ is not in the image of $f$.
</s>