Show that number of triples $(a,b,c)$ with $a,b,c\in [1,n]$ such that $ab=c$ is given by
$$\bigl|\bigl\{(a,b,c)\in [1,n]^3:ab=c\bigr\}\bigr|=2\sum_{i=1}^{\left\lfloor\sqrt{n}\right\rfloor}\Big(\left\lfloor\frac ni\right\rfloor-i\Big)+\left\lfloor\sqrt{n}\right\rfloor$$
Someone told me that this can be solved using hyperbolas. I could not really understand how that would help. Please help!
It could have been easier if the interval were not a requirement, but that is the part that is confusing me the most.
The idea is to count the number of triplets with $a \lt b$ in the sum and double it to account for reversing $a$ and $b$, then add in the triplets of the form $(a,a,a^2)$ with the last term. If a triplet has $a \lt b$, it also has $a \lt \sqrt n$ because otherwise $ab \gt n$. The sum therefore runs from $1$ to $\lfloor \sqrt n \rfloor$ because that is the range of values of $a$. $\lfloor \frac ni \rfloor$ is the number of multiples of $i$ that are less than or equal to $n$. We subtract $i$ for the cases where $b \le a$ and add the $(a,a,a^2)$ cases in with the $\lfloor \sqrt n \rfloor$.
Let us take an example of $n=15$, where $\lfloor \sqrt n \rfloor=3$. When $i=1$ there are $\frac {15}1=15$ multiples of $1$ less than or equal to $15$. One of those has $b \le a$, each of the others contributes two triplets and the term in the sum is $14$, which will get doubled at the end. When $i=2$ there are $7$ multiples of $2$ less than or equal to $15$, two of which have $b \le a$, so the entry in the sum is $5$. Finally there are four multiples of $3$ only one of which has $b \gt a$. The final calculation is $2(14+5+2)+3=45$ triplets.