# How to find all forms of the fraction that would be in between two other fractions?

I've been going through lots of my math textbooks, and I'm able to solve a lot of them using some specific method or formula. But there's one problem I've come across quite a few times that I just couldn't figure out how to do. One example is...

Suppose that $$\frac {4}{2001} < \frac {a}{a+b} < \frac {5}{2001}$$. Compute the number of different possible integer values that $$\frac {b}{a}$$ can take on.

Does anyone know a reliable method to do these kind of these problems, or even better, a formula? My best attempts have been to manually list out all of the possibilities, and it would really help if someone could explain a good way to do these kind of problems.

Hint: the inequality you are trying to satisfy is the same as $$\frac{2001}{4} > \frac{a+b}{a} > \frac{2001}{5}.$$
• Next hint: $\frac{a+b}{a} = 1 + \frac{b}{a}$. So you are, in effect, asking how many integers are between $\frac{2001}{4}$ and $\frac{2001}{5}$. You can compute both those numbers exactly... – Nate Eldredge Jun 1 '20 at 1:58
• So all of the numbers between (and including) $\floor (\frac {2001}{4})$ and $\ceil (\frac {2001}{5})$. Which should amount to 100? – Edwards Jun 1 '20 at 2:02
• @LazyJoeShow: Just subtracting the numbers won't quite answer the question, because you can't tell from the difference of two numbers alone how many integers are between them. Consider $1.8$ and $3.2$, versus $4.1$ and $5.5$. Both pairs have a difference of $1.4$, yet there are two integers between $1.8$ and $3.2$, and only one integer between $4.1$ and $5.5$. – Nate Eldredge Jul 11 '20 at 18:04