P73
projecteuler.net

Counting Fractions in a Range

ℹ️Published on Friday, 2nd July 2004, 06:00 pm; Solved by 27741;
Difficulty rating: 15%

Consider the fraction, $\dfrac n d$, where $n$ and $d$ are positive integers. If $n \lt d$ and $\operatorname{HCF}(n, d)=1$, it is called a reduced proper fraction.

If we list the set of reduced proper fractions for $d \le 8$ in ascending order of size, we get: 18,17,16,15,14,27,13,38,25,37,12,47,35,58,23,57,34,45,56,67,78

It can be seen that there are $3$ fractions between $\dfrac 1 3$ and $\dfrac 1 2$.

How many fractions lie between $\dfrac 1 3$ and $\dfrac 1 2$ in the sorted set of reduced proper fractions for $d \le 12\,000$?



Soluzione

Last modified: May 27, 2025. Website built with Franklin.jl and the lovely Julia programming language.