Find the sum of integers $x$ such that

$$\left\lfloor{\frac{x}{5}}\right\rfloor - \left\lfloor{\frac{x}{9}}\right\rfloor = \frac{x}{15}$$

I don't have much experience in solving problems with the floor function involved. I have rewritten the equation as

$$\frac{x}{45} + \left\{\frac{5x}{45}\right\} = \left\{\frac{9x}{45}\right\}$$

but don't know where to go from there.

[EDIT: Thanks, I understand how to solve it now.]


First, since the LHS is an integer, we know $x$ is a multiple of $15$. Thus, let $x = 15n$. Then our equation reduces to $$n = 3n - \left\lfloor \frac{15n}{9}\right\rfloor \implies$$ $$2n = \left\lfloor \frac{15n}{9}\right\rfloor \leq \frac{15n}{9}$$ thus ruling out any positive solutions. Now note that $$2n = \left\lfloor \frac{15n}{9}\right\rfloor \geq \frac{15n}{9}-1 \implies$$ $$n \geq -3$$ So any possible solutions for $n$ satisfy $-3 \leq n \leq 0$. Checking manually, we see that the only solutions are $n = 0, -1, -2$, i.e. $x = 0, -15, -30$.

  • $\begingroup$ I think you need to fix a small typo, If $2n\le\frac{15n}{9}$ then n is zero or negative “not positive” $\Rightarrow n\le0$. $\endgroup$ Jan 2 '17 at 7:05
  • $\begingroup$ @HazemOrabi I'm sorry, but I don't think I'm understanding your point. $\endgroup$
    – florence
    Jan 2 '17 at 7:08
  • 4
    $\begingroup$ @florence: You said it correctly: positive solutions are ruled out. (+1) $\endgroup$ Jan 2 '17 at 7:08
  • 2
    $\begingroup$ yes, sorry, U R correct. $\endgroup$ Jan 2 '17 at 7:09
  • 1
    $\begingroup$ $\lfloor x \rfloor > x - 1$; therefore $\left\lfloor \frac{15n}{9}\right\rfloor > \frac{15n}{9}-1$ which removes the need of manually testing $n=-3$ $\endgroup$
    – fabian
    Jan 2 '17 at 14:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.