Playing around with fractions, I eventually had to consider the following question:
Is there a formula for counting how many proper fractions in lowest terms with $n$ base-$b$ digits in both the numerator and the denominator are there?
So, for instance, things like $0$, $\frac24$, $\frac22$, and $\frac43$ don't count.
My first thought was that they'd be related to triangular numbers, but this seems to count the fractions not in lowest terms as well. I presume the final formula can be expressed as a triangular number minus some correction, but I can't figure out what that correction term ought to be.
Thanks!