# (floor function) sum of x: $\left\lfloor{\frac{x}{5}}\right\rfloor - \left\lfloor{\frac{x}{9}}\right\rfloor = \frac{x}{15}$

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.]

• What have you tried so far? We would like to help but we need to know where you are getting stuck. – Q the Platypus Jan 2 '17 at 6:35
• I think you are lucky to get the upvotes without any context at all. – StubbornAtom Jan 2 '17 at 12:35
• To ask a question on this site, there is no need to be stuck or to have a "context". – Martin Argerami Jan 2 '17 at 13:25

## 1 Answer

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$.

• 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$. – Hazem Orabi Jan 2 '17 at 7:05
• @HazemOrabi I'm sorry, but I don't think I'm understanding your point. – florence Jan 2 '17 at 7:08
• @florence: You said it correctly: positive solutions are ruled out. (+1) – Brian M. Scott Jan 2 '17 at 7:08
• yes, sorry, U R correct. – Hazem Orabi Jan 2 '17 at 7:09
• $\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$ – fabian Jan 2 '17 at 14:12