I don't have any particular motivation for this question, it just popped into my head.
We play the following game: you give me a real number between 0 and 1, and I have to do my best to approximate it as a rational number with a limit on the size of the denominator. More formally, you choose $x \in [0,1]$, and I have to come up with a pair of integers $p,q \leq N$ that minimize the error: $$ E = \bigg| x - \frac{p}{q} \bigg| $$
For a given $N$, how should you choose $x$ to make me incur the largest possible error?
I made a plot to see how all the possible fractions fall on the number line for each $N$ between 1 and 100. It has a rather interesting pattern which seems to have a fractal nature. For any $N$, the hardest choices of $x$ seem to be at the extremes of the interval: between 0 and the smallest possible fraction larger than 0, and between 1 and the largest possible fraction smaller than $1$.

The rationals with denominator less than $N$ form part of the Farey sequence. The largest gap is between $0$ and $\frac 1N$ and again from $\frac {N-1}N$ to $1$. The smallest gap is from $\frac 1N$ to $\frac 1{N-1}$ and again from $\frac{N-2}{N-1}$ to $\frac {N-1}N$, a gap of $\frac 1{N(N-1)}$ To find the best rational approximation to a given $x$, you find its continued fraction and quit with the last convergent with denominator less than $N$, and see if a small adjustment can improve it.