Originally Posted by

**Also sprach Zarathustra** Let x be a rational number in (113/191 ,184/311). Find x=a/b when is known that a<400.

{ 113/191 < a/b < 184/311 }

I have no elegant mathematical answer to your question. But an answer can relatively easily be found with the help of a little program: since there are only finitely many candiadates for a/b to consider.

For example, I have hacked together (rather hastily) the following Python script:

Code:

from math import floor, ceil
lb = 113.0/191.0 # lower bound of interval
ub = 184.0/311.0 # upper bound of interval
maxnum = 399.0 # max for numerator
checked = 0 # number of pairs a/b checked
found = 0 # number of a/b with lb < a/b < ub found
# we are not too fussy about the lower limit for the denominator,
# but because the numerator is limited we need not consider that
# many numerators a:
for b in range(1,ceil(maxnum/lb)):
for a in range(ceil(lb*b),max(ceil(lb*b)+1, ceil(ub*b))):
checked += 1
if (lb < float(a)/b and float(a)/b < ub):
found += 1
print "found: a/b = %d/%d" % (a,b)
print "total: checked %d, found %d" % (checked, found)

The final output is "total: checked 674, found 1".

So if this program does not contain a major flaw, the only a/b that satisfies your requirements is 297/502