a repository of mathematical know-how

Finding an interval for rational numbers with a high denominator

Stub iconThis article is a stub.This means that it cannot be considered to contain or lead to any mathematically interesting information.

Quick description

Some problems require one to find an interval of \R in which rational numbers, when written in lowest terms as p/q, have a denominator that is greater than a certain number. This sort of problem can be difficult to approach because given an interval, it may be hard to visualise what rational numbers lie in it. However, given the right notation the solution to this sort of problem becomes almost intuitive.


Definition of continuity, basic facts about real and rational numbers, intervals of real numbers, neighbourhoods.

Example 1

Every rational number x can be written in the form \frac{p}{q}, where q>0 and p and q are integers without any common divisors. Consider the function defined on \R by:

f(x) =  \begin{cases}   \frac{1}{q} &\text{if }x\text{ is rational, }x=\tfrac{p}{q}\text{ in lowest terms}\\   0           &\text{if }x\text{ is irrational.} \end{cases}

(This is Thomae's function). Prove that f is continuous at all irrational numbers and discontinuous at all rational numbers.

General discussion