Finding the number of fractions with unique values where the range for the denominator and numerator is in $\{1,2,\dots, n\}$

54 Views Asked by At

Imagine that you have a fraction, where both the numerator and denominator take values in the set $\{1,2,\dots, n\}$. Let us assume that the fraction is smaller then and or eqal to 1. The question is how many unique values can you get with every single combination in relation to $n$ and is there a function to describe it?

So far, I think that there is a relation to prime numbers but I do not know what it is. Here are the values for $n = 1,2,\dots,20$: \begin{align*} & 1=1, 2=\mathbf{2}, 3=\mathbf{5}, 4=\mathbf{7}, 5=\mathbf{11}, 6=\mathbf{13}, 7=\mathbf{19}, \\ & 8=\mathbf{23}, 9=\mathbf{29}, 10=33, 11=\mathbf{43}, 12=\mathbf{47}, 13=\mathbf{59}, 14=65, \\ & 15=\mathbf{73}, 16=81, 17=\mathbf{97}, 18=\mathbf{103}, 19=121, 20=129, \end{align*} where the emphasized numbers are primes.