I would appreciate if somebody could help me with the following problem:

Q: Floor function $f(x)=\lfloor 2x\rfloor+\lfloor 4x\rfloor+\lfloor 6x\rfloor+\lfloor 8x\rfloor$, $x\in\mathbb {R}$

Find $n\left(\{f(x)\;\vert\;\; 1\leq f(x) \leq 1000\}\right)$?


closed as unclear what you're asking by 5xum, Kamil Jarosz, Chris Godsil, J.-E. Pin, yoknapatawpha Feb 16 '16 at 16:17

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ What does $n$ stand for? $\endgroup$ – 5xum Feb 16 '16 at 8:20
  • $\begingroup$ I suppose $n(A)=$number of elements of set $A$ $\endgroup$ – sinbadh Feb 16 '16 at 8:25
  • $\begingroup$ Well if it denotes the size of the set then it's infinite since at least $x\in[1,2]$ have $1\leq f(x)\leq 1000$ $\endgroup$ – vrugtehagel Feb 16 '16 at 8:28
  • $\begingroup$ Question is unclear. I think it asks over the reals for which $x$ it holds $1\le f(x)\le 1000$. If it is just the count, then we are talking about naturals, and the floors are useless since $2x$, $4x$, $6x$ and $8x$ are integer anyway. $\endgroup$ – Giovanni Resta Feb 16 '16 at 8:28
  • 2
    $\begingroup$ I can see two possible meanings for the question: either it is asking for which $x$ is $1≤ f(x)≤ 1000$ which is pretty easy, or it is asking which integers between $1$ and $1000$ are values for $f(x)$ (for example, $3$ is not a possible value). The latter question seems more interesting. $\endgroup$ – lulu Feb 16 '16 at 8:30

I'll sketch a solution to the other possible question here: "how many values between $1$ and $1000$ are taken by $f(x)$"

The possible values for the function $f(x)$ fall into a simple pattern. As $x$ increases, the individual floor terms go up by $1$ whenever $x$ reaches a rational number with denominator $2,4,6,8$ (note: $x$ need not be in lowest terms). The least common multiple of those numbers is $24$ so we only need to look at all rational numbers (not necessarily reduced) with denominator $24$, thus we are looking at rationals of the form $\frac n{24}$ as $n$ runs from $0$ to $50\times 24$. Of course the "gap sequence" is periodic with period at most $24$ (in fact it has period $12$). A little more work shows that the possible values for $f(x)$ form a sequence which begins $$\{0,1,2,4,5,6,10,11,12,14,15,16,20,21,22,\dots\}$$

And again the gap sequence is periodic, now with period $6$. More precisely the gap sequence is $\{1,1,2,1,1,4\}$ repeated. Armed with this it isn't exactly hard to ask a machine to do the count. Of course, the calculation is somewhat error prone so I advise checking, but I got $\fbox {600}$ values. Off the top of my head I don't see a rapid way to do the count analytically, but I expect there is a way.

  • $\begingroup$ I obtained the same result. $\endgroup$ – sinbadh Feb 16 '16 at 9:07
  • $\begingroup$ @sinbadh Thanks. Every time I try to do it analytically I make "off by one" errors. A little frustrating. Well, in my defense I'm not really awake. $\endgroup$ – lulu Feb 16 '16 at 9:10

I imagine you are asking for which values of $x$ the function $$ f(x) = \lfloor 2x\rfloor+\lfloor 4x\rfloor+\lfloor 6x\rfloor+\lfloor 8x\rfloor $$ is between 1 and 1000.

Since this is clearly a non decreasing function we can concentrate on the boundaries.

When is $f(x)\ge 1$. Clearly when the first addend becomes 1. So this happens for $x\ge \frac{1}{8}$.

When does $f(x)$ reach 1000 ?

Let's take an approximation over the integers. Consider $$g(x) = 2x+4x+6x+8x = 20x $$ This function concide with $f(x)$ when $x$ is an integer. Clearly $g(x)\le 1000$ for $x\le 50$.

So we know that $f(50)=1000$ as well. Now, $f(x)$ is always an integer, and thanks to floor function it can be $f(x)\le 1000$ when $x>50$.

So we are really interested in understanding when $f(x)<1001$. As for $f(x)\ge 1$ is easy to see that $f(50+\frac{1}{8}) = 1001$, so the answer is $$ \frac{1}{8} \le x<50+\frac{1}{8}.$$


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