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?