2007 SMT Algebra Round Problem 4

Problem

How many positive integers $n$, with $n\leq2007$, yield a solution for $x$ (where $x$ is real) in the equation $\lfloor x\rfloor+\lfloor 2x\rfloor+\lfloor 3x\rfloor=n$?

Solution

Let's try to find solutions for $n$ If $n=1$, then we have a solution when $x=0.35$. If $n=2$, then we have a solution when $x=0.5$. If $n=3$, then we have a solution $x=0.9$. If $n=6$, then we have a solution $x=1$. If $x<1$, we have $n\leq3$ and if $x\geq1$, then we have $n\geq6$, so $n=4$ or $5$ do not have a solution. If $n\geq6$, then just add $\left\lfloor \frac{n}{6}\right\rfloor$ to the solution to the remainder of $\frac{n}{6}$ and if the remainder of $\frac{n}{6}$ is $4$ or $5$, then there is no $x$ that satisfies the equation. So, we have $4$ possibilities out of every $6$ numbers, so we can get the number of solutions by doing $4\times\left\lfloor \frac{2007}{6}\right\rfloor=1336$ and then getting that the remainder of $\frac{2007}{6}$ is 3 and so we have $n$'s where when divided by 6 gives remainder of $1,2,$ and $3$, so they all have a solution of $x$, and so we add $3$ to $1336$ to get $\boxed{\mathrm{1339}}$.

~Yuhao2012