Values of $n$ for which $\lfloor 2 x\rfloor +\lfloor 4 x\rfloor +\lfloor 8 x\rfloor +\lfloor 20 x\rfloor =n$ has a solution

169 Views Asked by At

$$\lfloor 2 x\rfloor +\lfloor 4 x\rfloor +\lfloor 8 x\rfloor +\lfloor 20 x\rfloor =n$$

How would you find the values of $n$ for which the equation has a solution under the condition that $n \leq 500$? I haven't really worked with equations involving floors before.

3

There are 3 best solutions below

5
On BEST ANSWER

First we will analyse the "simpler" function $\lfloor 2 x\rfloor +\lfloor 4 x\rfloor +\lfloor 8 x\rfloor$. To do this we will look at the jump points (the points where the function "jumps"). These occur at points of the form $\frac{k}{8}$ with $k$ an integer. We shall look at how much the function jumps depending on $k$. If $k$ is a multiple of $4$ then the function jumps by $2$. If $k$ is a multiple of $2$ but not of $4$ then it jumps by 2, and if $k$ is not a multiple of 2 it jumps by $1$. So if we add the first few jumps (starting at evaluating the function at $k=0$ we get:

$0$

$0+1=1$( the first jump, when $k=1$)

$1+2$ (the second jump, when $k=2$)

$3+1$ (the third jump, when $k=3$)

$4+3$ (the fourth jump, when $k=4$)

After this the magnitude of the jumps will continue to cycle. Therefore for this function $n$ has a solution if and only if $n$ leaves residue $0,1,3$ or $4$ when divided by $7$

Now let us look at the behaviour of the function $\lfloor \frac{x}{20} \rfloor$. Clearly this one jumps at points of the form $\frac{l}{20}$ when $k$ is an integer and jumps one at each point.

So now we can put both of these together by looking at jumps of the form $\frac{m}{40}$ Under the jumps for the first part of the function are the same as before. and the jumps for the second part only occur when $m$ is a multiple of $2$. Therefore we can make a new rule: if $m$ We divide into two cases: if $m$ is a multiple of $2$ but not of 5: add 1. The next case is when $m$ is a multiple of $5$:if $m$ is not a multiple of $2$ add 1,if $m$ is a multiple of $2$ but not of $4$ add $3$, if $m$ is a multiple of $4$ add $4$. So calculating the first 40 values we get: $0, 1, 1, 2, 3, 4, 4, 5, 5, 8, 8, 9, 9, 10, 11, 12, 12, 13, 13, 17, 17, 18, 18, 19, 20, 21, 21, 22, 22, 25, 25, 26, 26, 27, 28, 29, 29, 30, 30, 34$

So $n$ has a solutionf if and only if it leaves one of those residues when divided by $34$

2
On

Let $x=I+f$, where $I \in \mathbb{Z}$ and $0 \leq f < 1$ (the fractional part). Then $\lfloor 2 x\rfloor = \lfloor 2I + 2f\rfloor =\begin{cases} 2I & \text{ if } 0 \leq f < \frac{1}{2} \\ 2I+1 & \text{ if } \frac{1}{2} \leq f < 1. \end{cases}$

Now do the same for other expressions and convert everything into equations with integer $I$ and solve.

Second approach:

Let $f(x)=\lfloor 2 x\rfloor +\lfloor 4 x\rfloor +\lfloor 8 x\rfloor +\lfloor 20 x\rfloor$. Then for any $m \in \mathbb{Z}$, we have $$f(x+m)=f(x)+34m.$$ Thus if we can express an integer $n$ as $f(x_0)$ for some $x_0 \in \mathbb{R}$, then we can express all integers of the form $n+34m$ also in terms of $f$. So this reduces the problem of finding all the first $34$ integers that can be expressed as $f(x)$ when $x \in (0,1]$.

1
On

Let's make a change of variables, that $x \mapsto \tfrac{x}{40}$, so our new function reads:

$$ f(x) = \lfloor \tfrac{x}{20} \rfloor + \lfloor \tfrac{x}{10} \rfloor + \lfloor \tfrac{x}{5}\rfloor + \lfloor \tfrac{x}{2} \rfloor $$

This is the sum of 4 step functions and we notice this function behaves kind of like a line:

$$ \begin{array}{ccc} f(x + 40) &=& \lfloor \tfrac{x + 40}{20} \rfloor + \lfloor \tfrac{x + 40}{10} \rfloor + \lfloor \tfrac{x + 40}{5}\rfloor + \lfloor \tfrac{x + 40}{2} \rfloor \\\\ &=& (\lfloor \tfrac{x}{20} \rfloor + 2)+ (\lfloor \tfrac{x + 40}{10} \rfloor + 4)+ (\lfloor \tfrac{x + 40}{5}\rfloor + 8)+ (\lfloor \tfrac{x + 40}{2} \rfloor + 20) \\\\ &=& \lfloor \tfrac{x}{20} \rfloor + \lfloor \tfrac{x }{10} \rfloor + \lfloor \tfrac{x }{5}\rfloor + \lfloor \tfrac{x }{2} \rfloor + 34 \\\\ &=& f(x) + 34 \end{array} $$

enter image description here

Notice how the jumps are distributed like the lines on a ruler:

enter image description here

Here is a list of the values they obtain with some repetitions

0,  0,  1,  1,  2,  3,  4,  4,  5,  5,  8,  8,  9,  9, 10, 11, 12,
12, 13, 13, 17, 17, 18, 18, 19, 20, 21, 21, 22, 22, 25, 25, 26, 26,
27, 28, 29, 29, 30, 30