I recently learnt that the expected number of prime factors for an integer $n$ is on the order of $\log\log n$. This was apparently proven by Hardy and Ramanujan.
This led to me wondering what the expected number of (total) factors for a given number is.
I am aware that, if $n=p_1^{\nu_1}p_2^{\nu_2}p_3^{\nu_3}\cdots p_k^{\nu_k}$, then the number of factors of $n$ is $\prod_{i=1}^k\left(\nu_i+1\right)$. I also know that $\displaystyle P(\nu_i=a)=\frac1{p_i^{~a}}$. Not sure how to proceed, though.
The trick is to look at the problem upside down. Instead of looking at each integer and wondering how many divisors they have, which can get quite hard, you instead count how many integers in $[1,n]$ have $k$ as a factor, for $1 \leq k \leq n$. As there are about $n/k$ such integers, you can estimate this by
$$\frac{1}{n}\sum_{k=1}^n \#\{j \leq n : k|j\}=\frac{1}{n}\sum_{k=1}^n (\frac{n}{k}+O(1))=(\sum_{k=1}^n \frac{1}{k})+O(1)=\log(n)+O(1),$$
using the estimation $$H_n=\sum_{k=1}^n \frac{1}{k}=\log(n)+O(1).$$