# Equation involving greatest integer function $\lfloor . \rfloor$ (floor function)

If $0 < x < 1000$ and $\lfloor \frac{x}{2} \rfloor + \lfloor \frac{x}{3} \rfloor + \lfloor \frac{x}{5} \rfloor = \lfloor \frac{31x}{30} \rfloor$
(where $\lfloor . \rfloor$ denotes the greatest integer function),
then find all the possible values of $x$.

As this involved Greatest Integer function I am getting confused. The value of $x$ should match with the range.

• Hadn't $x$ better be a multiple of $30$? – Lord Shark the Unknown Aug 27 '17 at 9:52

Definition of Greatest integer: For all real numbers, $x$, the greatest integer function returns the largest integer less than or equal to $x$. In essence, it rounds down a real number to the nearest integer.

Note that $\frac{x}{2}$ + $\frac{x}{3}$+ $\frac{x}{5}$ =$\frac{31x}{30}$ .

Since it involves Greatest integer, $\frac{x}{2}$, $\frac{x}{3}$, $\frac{x}{5}$ and $\frac{31x}{30}$ must be integers in order to satisfy $\frac{x}{2}$ + $\frac{x}{3}$+ $\frac{x}{5}$ =$\frac{31x}{30}$ .

Therefore, $x$ must be multiples of 30.

The possible solutions of $x$ are multiples of 30 within the range of 0 < $x$ < 1000.

Complete List: 30, 60, 90, 120, 150, 180, 210, 240, 270, 300, 330, 360, 390, 420, 450, 480, 510, 540, 570, 600, 630, 660, 690, 720, 750, 780, 810, 840, 870, 900, 930, 960 and 990.

• Notice that $x$ need not to be an integer. – Davood Khajehpour Aug 27 '17 at 12:57

Let's define: $$\ \ \ \ \ \ \ \ f(s) = \{ \frac {s} { 2} \} + \{ \frac {s} { 3} \} + \{ \frac {s} { 5} \} \ ;$$ also let's define: $$g(m)=\frac {30} { 31}\big(1-f(m)\big)$$

$x$ satisfies the above equation if and only if :

$$\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k, 30k+g(0) \ \big) \ \ \ \text{or} \ \ \ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+6, 30k+6+g(6) \ \big) \ \ \ \ \ \ \ \ \ \ \text{or} \ \ \ \\ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+10, 30k+10+g(10) \ \big) \ \ \ \text{or} \ \ \ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+12, 30k+12+g(12) \ \big) \ \ \ \text{or} \ \ \$$

$$x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+15, 30k+15+g(15) \ \big) \ \ \ \text{or} \ \ \ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+16, 30k+16+g(16) \ \big) \ \ \ \text{or} \ \ \ \\ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+18, 30k+18+g(18) \ \big) \ \ \ \text{or} \ \ \ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+20, 30k+20+g(20) \ \big) \ \ \ \text{or} \ \ \$$

$$x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+21, 30k+21+g(21) \ \big) \ \ \ \text{or} \ \ \ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+22, 30k+22+g(22) \ \big) \ \ \ \text{or} \ \ \ \\ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+24, 30k+24+g(24) \ \big) \ \ \ \text{or} \ \ \ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+25, 30k+25+g(25) \ \big) \ \ \ \text{or} \ \ \$$

$$x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+26, 30k+26+g(26) \ \big) \ \ \ \text{or} \ \ \ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+27, 30k+27+g(27) \ \big) \ \ \ \text{or} \ \ \ \\ x \in \bigcup_{k \in \mathbb{Z}} \big[ \ 30k+28, 30k+28+g(28) \ \big) \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \$$

Notice that by Euclid's algorithm
there are numbers $n \in \mathbb{Z}$ and $t \in \mathbb{R}$ such that $x=30n+t$, with $0 \leq t < 30$,
by replacing we get that:

$$\lfloor \frac {30n+t} { 2} \rfloor + \lfloor \frac {30n+t} { 3} \rfloor + \lfloor \frac {30n+t} { 5} \rfloor = \lfloor \frac{31(30n+t)}{30} \rfloor \Longleftrightarrow \\ 15n + \lfloor \frac {t} { 2} \rfloor + 10n + \lfloor \frac {t} { 3} \rfloor + 6n + \lfloor \frac {t} { 5} \rfloor = 31n + \lfloor \frac{31t}{30} \rfloor \Longleftrightarrow \\ \lfloor \frac {t} { 2} \rfloor + \lfloor \frac {t} { 3} \rfloor + \lfloor \frac {t} { 5} \rfloor = \lfloor \frac{31t}{30} \rfloor \Longleftrightarrow \\ \lfloor \frac {t} { 2} \rfloor + \lfloor \frac {t} { 3} \rfloor + \lfloor \frac {t} { 5} \rfloor = \lfloor \frac {t} { 2} + \frac {t} { 3} + \frac {t} { 5} \rfloor ; \ \ \ \ \$$ now let's write $\frac {t} { 2} = \lfloor \frac {t} { 2} \rfloor + \{ \frac {t} { 2} \}$ , $\frac {t} { 3} = \lfloor \frac {t} { 3} \rfloor + \{ \frac {t} { 3} \}$ , $\frac {t} { 5} = \lfloor \frac {t} { 5} \rfloor + \{ \frac {t} { 5} \}$ , by replacing we get: $$\Longleftrightarrow \lfloor \frac {t} { 2} \rfloor + \lfloor \frac {t} { 3} \rfloor + \lfloor \frac {t} { 5} \rfloor = \Bigg{\lfloor} \lfloor \frac {t} { 2} \rfloor + \lfloor \frac {t} { 3} \rfloor + \lfloor \frac {t} { 5} \rfloor + \{ \frac {t} { 2} \} + \{ \frac {t} { 3} \} + \{ \frac {t} { 5} \} \Bigg{\rfloor} \Longleftrightarrow \\ \ \ \ \ \ \ \ \ \ \lfloor \frac {t} { 2} \rfloor + \lfloor \frac {t} { 3} \rfloor + \lfloor \frac {t} { 5} \rfloor = \lfloor \frac {t} { 2} \rfloor + \lfloor \frac {t} { 3} \rfloor + \lfloor \frac {t} { 5} \rfloor + \Bigg{\lfloor} \{ \frac {t} { 2} \} + \{ \frac {t} { 3} \} + \{ \frac {t} { 5} \} \Bigg{\rfloor} \Longleftrightarrow \\ 0 = \Bigg{\lfloor} \{ \frac {t} { 2} \} + \{ \frac {t} { 3} \} + \{ \frac {t} { 5} \} \Bigg{\rfloor} \Longleftrightarrow \\ \ \ \ \ \ \ \ \ \{ \frac {t} { 2} \} + \{ \frac {t} { 3} \} + \{ \frac {t} { 5} \} < 1 \ .$$

Now let's define: $$\ \ \ \ \ \ \ \ f(s) = \{ \frac {s} { 2} \} + \{ \frac {s} { 3} \} + \{ \frac {s} { 5} \} \ ;$$

also we can write $t=m+y$ where $m \in \{ 0, 1, 2, ... ,29 \}$ and $y \in [0, 1)$.

$$\ \{ \frac {t} { 2} \} + \{ \frac {t} { 3} \} + \{ \frac {t} { 5} \} < 1 \Longleftrightarrow \\ f(m) + \frac {y} { 2} + \frac {y} { 3} + \frac {y} { 5} < 1 \Longleftrightarrow \\ \ \ \ \ \ \ \ \ \ \ \ \ \ f(m) + \frac {31} { 30}y < 1 \Longleftrightarrow \\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ y < \frac {30} { 31}\big(1-f(m)\big)$$

• $f(0)=0$; which gives the interval $[0, \frac {30} { 31})$ for $y$

• $f(1)=\frac {31} { 30} > 1$; so there is no such $y$ in this case.

• $f(2) > 1$; so there is no such $y$ in this case.

• $f(3) > 1$; so there is no such $y$ in this case.

• $f(4) > 1$; so there is no such $y$ in this case.

• $f(5) > 1$; so there is no such $y$ in this case.

• $f(6)=\frac {1} { 5}$; which gives the interval $[0, \frac {30} { 31} . \frac {4} { 5})$ for $y$

• $f(7) > 1$; so there is no such $y$ in this case.

• $f(8) > 1$; so there is no such $y$ in this case.

• $f(9) > 1$; so there is no such $y$ in this case.

• $f(10)=\frac {1} { 3}$; which gives the interval $[0, \frac {30} { 31} . \frac {2} { 3})$ for $y$

• $f(11) > 1$; so there is no such $y$ in this case.

• $f(12)=\frac {2} { 5}$; which gives the interval $[0, \frac {30} { 31} . \frac {3} { 5})$ for $y$

• $f(13) > 1$; so there is no such $y$ in this case.

• $f(14) > 1$; so there is no such $y$ in this case.

• $f(15)=\frac {1} { 2}$; which gives the interval $[0, \frac {30} { 31} . \frac {1} { 2})$ for $y$

• $f(16)=\frac {8} { 15}$; which gives the interval $[0, \frac {30} { 31} . \frac {7} { 15})$ for $y$

• $f(17) > 1$; so there is no such $y$ in this case.

• $f(18)=\frac {3} { 5}$; which gives the interval $[0, \frac {30} { 31} . \frac {2} { 5})$ for $y$

• $f(19) > 1$; so there is no such $y$ in this case.

• $f(20)=\frac {2} { 3}$; which gives the interval $[0, \frac {30} { 31} . \frac {1} { 3})$ for $y$

• $f(21)=\frac {7} { 10}$; which gives the interval $[0, \frac {30} { 31} . \frac {3} { 10})$ for $y$

• $f(22)=\frac {11} { 15}$; which gives the interval $[0, \frac {30} { 31} . \frac {4} { 15})$ for $y$

• $f(23) > 1$; so there is no such $y$ in this case.

• $f(24)=\frac {4} { 5}$; which gives the interval $[0, \frac {30} { 31} . \frac {1} { 5})$ for $y$

• $f(25)=\frac {5} { 6}$; which gives the interval $[0, \frac {30} { 31} . \frac {1} { 6})$ for $y$

• $f(26)=\frac {13} { 15}$; which gives the interval $[0, \frac {30} { 31} . \frac {2} { 15})$ for $y$

• $f(27)=\frac {9} { 10}$; which gives the interval $[0, \frac {30} { 31} . \frac {1} { 10})$ for $y$

• $f(28)=\frac {14} { 15}$; which gives the interval $[0, \frac {30} { 31} . \frac {1} { 15})$ for $y$
which gives the interval $[28, 28+\frac {30} { 31} . \frac {1} { 15})$ for $t$.

• $f(29) > 1$; so there is no such $y$ in this case.

Both the LHS and the RHS of the given equation increase by $31$ when $x$ increases by $30$. It is therefore sufficient to consider the interval $0\leq x<30$. The substitution $x:=30y$ $(0\leq y<1)$ transforms the given equation into $$\lfloor 15y\rfloor+\lfloor 10y\rfloor+\lfloor 6y\rfloor=\lfloor 31y\rfloor\qquad(0\leq y<1)\ .\tag{1}$$ The ${\rm lcm}$ of the coefficients appearing in $(1)$ is $930$. It follows that both the LHS and the RHS of $(1)$ are constant on the intervals $$J_k:=\left[{k-1\over 930}, {k\over 930}\right[\qquad(1\leq k\leq 930)\ .$$ It is a matter of coincidence in which of these $J_k$ the condition $(1)$ is fulfilled. Looking at a graph produced by Mathematica one finds out that the union of these $J_k$ is the discrete union of $13$ intervals showing no particular pattern; see Famke's answer.