Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How would you determine all integers $m$ such that the following is true?

$$\frac{1}{m}=\frac{1}{\lfloor 2x \rfloor}+\frac{1}{\lfloor 5x \rfloor} .$$

Note that $\lfloor \cdot \rfloor$ means the greatest integer function. Also, $x$ must be a positive real number.

share|cite|improve this question
Do you want to find all $m$ such that the equation is satisfied for some $x > 0$? (The question is missing the quantifier over $x$.) – Srivatsan Oct 30 '11 at 20:23

You can solve it by cases. Let $x=n+r$, where $n$ is an integer and $r=\lfloor x\rfloor$. Then $\lfloor 2x\rfloor = \lfloor 2n+2r\rfloor = 2n+\lfloor 2r\rfloor$ and $\lfloor 5x\rfloor = \lfloor 5n+5r\rfloor = 5n+\lfloor 5r\rfloor$, and the original equation can be written as $$\frac1m = \frac1{2n+\lfloor 2r\rfloor}+\frac1{5n+\lfloor 5r\rfloor}.$$

You know that $0\le r<1$, and you can get exact values for $\lfloor 2r\rfloor$ and $\lfloor 5r\rfloor$ for $r$ in different subintervals of $[0,1)$.

  • If $0\le r<\frac15$, $\lfloor 2r\rfloor=\lfloor 5r\rfloor=0$.
  • If $\frac15\le r <\frac25$, $\lfloor 5r\rfloor = 1$ and $\lfloor 2r\rfloor = 0$.
  • If $\frac25\le r<\frac12$, $\lfloor 5r\rfloor = 2$ and $\lfloor 2r\rfloor = 0$.
  • If $\frac12\le r<\frac35$, $\lfloor 5r\rfloor = 2$ and $\lfloor 2r\rfloor = 1$.

And there are two more intervals, which I’ll leave to you.

If $0\le r<\frac15$, the equation becomes simply $$\frac1m=\frac1{2n}+\frac1{5n}=\frac{7n}{10n^2}=\frac7{10n};$$ in order for $m$ to be an integer, $n$ must be a multiple of $7$, say $n=7k$, we get $m=10k$. In other words, this case gives us every positive multiple of $10$ as a solution.

If $\frac15\le r <\frac25$, the equation becomes $$\frac1m=\frac1{2n}+\frac1{5n+1}=\frac{7n+1}{10n^2+2n},$$ or $$m=\frac{10n^2+2n}{7n+1}.$$ Divide this out to get $$m = \frac{10}7n+\frac4{49}-\frac4{49(7n+1)} = \frac{70n+4}{49}-\frac4{49(7n+1)},$$ and multiply through by $49$ to get $$49m=70n+4-\frac4{7n+1}$$ or, with a little rearrangement, $$49m-70n-4=\frac4{7n+1}.$$ But this is impossible if $n$ and $m$ are integers, because the lefthand side is an integer, and the righthand side isn’t. Thus, there are no solutions in this case.

If $\frac25\le r<\frac12$, the equation becomes $$\frac1m=\frac1{2n}+\frac1{5n+2}=\frac{7n+2}{10n^2+4n},$$ so $$m=\frac{10n^2+4n}{7n+2}=\frac{10n}7+\frac8{49}-\frac{16}{49(7n+2)},$$ and $$49m=70n+8-\frac{16}{7n+2}.$$ This time there is one value of $n$ that makes the righthand side an integer, namely, $n=2$. Substituting $n=2$ into the last equation, we get $49m=140+8-1=147$, and $m=3$; this is the only solution in this case. (Note that had the righthand side not been a multiple of $49$ when $n=2$, there would have been no solutions in this case.)

You can continue in this fashion through the remaining three cases. There may be an easier approach, but this one is at least systematic and workable.

share|cite|improve this answer

Here is an idea, the computations seem too long to actually try.

Naive approach: forget the integer part. We need then $m=\frac{10x}{7}$ or $x = \frac{7m}{10}$.

Now non-naive approach: Try $x = \frac{7m+k}{10}$ where $k$ is small enough. $0 \leq k \leq 9$ or $6$ should work depending by whatever $7m$ is module 10. A case by case analysis might work, but the computations are too long to try.

It seems to me that this idea should work, but it could simply lead to a waste of time.

BTW: is it probably easy to argue that $x = \frac{7y+k}{10} + \epsilon$, for some integers $y,k$ with $k$ "small" and $0< \epsilon <\frac{1}{10}$ and then one can argue that we can ignore that $\epsilon$ part.

share|cite|improve this answer

We will assume that $x,m > 0$. Our results show (unless there is some mistake in the case analysis) that the only solutions (up to a value of $x$) are given by $$ \frac{1}{10C} = \frac{1}{14C} + \frac{1}{35C} $$ and the exceptional solution $$ \frac{1}{3} = \frac{1}{\lfloor 2\cdot 2.4\rfloor} + \frac{1}{\lfloor 5\cdot 2.4\rfloor} = \frac{1}{4} + \frac{1}{12}. $$

As user9176 mentions, intuitively it is obvious that we can assume that $x$ is of the form $A + B/10$, where $B \in \{0,\cdots,9\}$. We then have $$\lfloor 2x \rfloor = 2A + \alpha, \; \lfloor 5x \rfloor = 5A + \beta, $$ where $\alpha,\beta$ depend on $B$ and take on the six values $$(0,0);(0,1);(0,2);(1,2);(1,3);(1,4). $$ We can thus rewrite the equation as $$ (2A + \alpha) (5A + \beta) = m(7A + \alpha + \beta), $$ from which we can form a quadratic $$ 10A^2 - (7m - 5\alpha - 2\beta)A - ((\alpha+\beta)m - \alpha\beta). $$ The discriminant of the quadratic is $$ (7m - 5\alpha - 2\beta)^2 + 40 ((\alpha+\beta)m - \alpha\beta). $$ For the equation to have integer solutions, we need the discriminant to be a perfect square. Let's see what that implies for each of the six pairs $(\alpha,\beta)$.

The first case, $(0,0)$, doesn't actually require the theory. The equation simply reads $10A^2 = 7mA$, or $10A = 7m$, which implies that $7|A$. On the other hand, if $A = 7C$, then we can recover $m = 10C$. We get the parametric solution $$ m = 10C, x \in [7C,7C+0.2). $$

Next, consider $(0,1)$. The discriminant is $$ (7m-2)^2 + 40m. $$ The squares following $(7m-2)^2$ are $$(7m-2)^2 + \{14m - 3, 28m - 4, 42m - 3, 56m\}.$$ Comparing coefficients, we see that the discriminant cannot be a perfect square.

Next, consider $(0,2)$. The discriminant is $$ (7m-4)^2 + 80m. $$ The squares following $(7m-4)^2$ are $$(7m-4)^2 + \{14m-7, 28m-12, 42m-15, 56m-16, 70m-15, 84m-12, 98m-7\}.$$ Comparing coefficients, the only solution is $m = 3$. The quadratic now reads $$ 10A^2 - 17A - 6 = 0 = (10A + 3)(A - 2). $$ The only integral solution is $A = 2$, and we get the solution $$ m = 3, x \in [2.4,2.5).$$

Next, consider $(1,2)$. The discriminant is $$ (7m-9)^2 + 120m - 80. $$ The squares following $(7m-9)^2$ are $$\begin{align*} (7m-9)^2 + \{&14m-17,28m-32,42m-45,56m-56,70m-65,\\&84m-72,98m-77,112m-80,126m-81,140m-80,154m-77\}. \end{align*}$$ This time there are no integral solutions.

Next, consider $(1,3)$. The discriminant is $$ (7m-11)^2 + 160m - 120. $$ The squares following $(7m-11)^2$ are $$\begin{align*} (7m-11)^2 + \{&14m-21, 28m-40, 42m-57, 56m-72, 70m-85, \\ &84m-96, 98m-105, 112m-112, 126m-117, 140m-120, \\ &154m-121, 168m-120, 182m-117\}. \end{align*}$$ Again there are no integral solutions.

Finally, consider $(1,4)$. The discriminant is $$ (7m-13)^2 + 200m - 160. $$ The squares following $(7m-13)^2$ are $$\begin{align*} (7m-13)^2 + \{& 14m-25, 28m-48, 42m-69, 56m-88, 70m-105, \\& 84m-120, 98m-133, 112m-144, 126m-153, 140m-160, \\& 154m-165, 168m-168, 182m-169, 196m-168, 210m-165, \\& 224m-160, 238m-153\}. \end{align*}$$ Once again there are no integral solutions.

share|cite|improve this answer

If $k + j/10 \le x < k + (j+1)/10$ where $k$ and $j$ are nonnegative integers and $j \le 9$, $\lfloor 2x \rfloor = \begin{cases} 2k & 0 \le j \le 4 \\ 2k+1 & 5 \le j \le 9 \end{cases}$ while $\lfloor 5x \rfloor = \begin{cases} 5k + j/2 & j \ \text{even} \\ 5k + (j-1)/2 & j \ \text{odd} \end{cases}$.

Going over the various cases $j = 0$ to $9$, I find two cases where $f(x) = \frac{1}{1/\lfloor 2x \rfloor + 1/\lfloor 5x \rfloor} $ is an integer:

1) if $j = 0$ or $1$ and $k > 0$ is divisible by 7, $f(x) = 10 (k/7)$.

2) if $k=2$ and $j=4$, $f(x) = 3$.

Case (2) comes about as follows: if $j = 4$, $f(x) = \frac{1}{1/(2k) + 1/(5k+2)} = \frac{(2k)(5k+2)}{7k+2}$. Note that $\gcd(k,7k+2) = \gcd(k,2) = 1$ or $2 $ while $\gcd(5k+2,7k+2) = \gcd(5k+2,2k) = \gcd(k+2,2k) =1$, $2$ or $4$. The largest possible value of the denominator that could divide the numerator is thus $2 \times 2 \times 4 = 16$, which occurs for $k=2$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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