1
$\begingroup$

I would like to determine the cardinality of this set (given that $a,b \in \mathbb{N}$ and we do not know which one is larger):

$\Big\{\frac{1}{1},\frac{2}{1},\frac{3}{1},...,\frac{a}{1},\frac{1}{2},\frac{2}{2},\frac{3}{2},...,\frac{a}{2},...,\frac{1}{b},\frac{2}{b},\frac{3}{b},...,\frac{a}{b} \Big\}$?

I am aware of the existence of https://oeis.org/A018805

and that we may use this to compute the cardinality of

$\Big\{ \frac{1}{1},\frac{2}{1},...,\frac{k}{1},\frac{1}{2},...,\frac{k}{2},...,\frac{1}{k},...,\frac{k}{k} \Big\}$. I am sort of confused if this may be used to compute the first set I described, or if we would have to come up with an additional rule.

This was my idea: we need to look at two different cases: $a>b$ and $a<b$ since $a=b$ case has been done already directly by the given function in A018805.

Now, the question is, would this also work for the cases $a>b$ and $a<b$? Would we have to use something additional?

$\endgroup$
1
  • $\begingroup$ Are different fractions with the same value be considered distinct ? $\endgroup$
    – Peter
    Commented Jan 3, 2021 at 12:40

1 Answer 1

3
$\begingroup$

The cardinality of your set equals the cardinality of all pairs $(x,y)\in \{1,\ldots, a\}\times \{1,\ldots, b\}$ with $\gcd(x,y)=1$.

An upper bound is of course $ab$, but we have to subtract the $\lfloor \frac a2\rfloor\cdot \lfloor \frac b2\rfloor$ pairs where both $x$ and $y$ are even, as well as the $\lfloor \frac a3\rfloor\cdot \lfloor \frac b3\rfloor$ pairs where $x$ and $y$ are multiples of $3$. Unfortunately, this subtracts multiples of $6$ twice, so we have to add back $\lfloor \frac a6\rfloor\cdot\lfloor \frac b6\rfloor$. Ultimately, we end up with this expression: $$ \sum_{d=1}^\infty\mu(d)\left\lfloor \frac ad\right\rfloor\left\lfloor \frac bd\right\rfloor$$

$\endgroup$
1
  • $\begingroup$ So essentially $\sum_{d=1}^{\infty}\mu(d)\lfloor \frac{a}{d} \rfloor \lfloor \frac{b}{d} \rfloor$ is the cardinality of this set, and $\mu(d)$ here is the Mobius function? $\endgroup$
    – user830143
    Commented Jan 4, 2021 at 2:14

You must log in to answer this question.