Given a number,can we find out the **number of edges** in its divisor lattice Given a number,can we find out the number of edges in its divisor lattice.for Finding the no of vertices we can maybe do it but how to find edges confused.
maybe we can do it while taking subsets
 A: As Jeremy Dover suggested in a comment, start from the prime factorization:
$$n=p_1^{r_1}\cdot p_2^{r_2}\cdots p_m^{r_m}$$
Concentrating on the exponents and writing them as a vector, you have $(r_1,r_2,\ldots,r_m)$ as the top element of your lattice, and you have $(0,0,\ldots,0)$ as the bottom element (representing the number $1$).
You have $(r_1+1)(r_2+1)\cdots(r_m+1)=\prod_{i=1}^m(r_i+1)$ vertices in between, since each coordinate can range from $0$ to $r_i$ inclusive.
You have an edge between any two vertices which differ by exactly a $1$ in the value of exactly $1$ coordinate. So if you fix coordinates $2$ through $m$, there are exactly $r_1$ such steps. How many ways are there to fix $2$ through $m$? That's again $\prod_{i=2}^m(r_i+1)$. So for this single (first) direction you have $r_1\cdot\prod_{i=2}^m(r_i+1)$ edges. Summing over all directions you get
$$\sum_{j=1}^m\left(r_j\cdot\prod_{\substack{i=1\\i\neq j}}^m(r_i+1)\right)=
\sum_{j=1}^m\left(\frac{r_j}{r_j+1}\cdot\prod_{i=1}^m(r_i+1)\right)$$
which you can write more easily as
$$\left(\sum_{j=1}^m\frac{r_j}{r_j+1}\right)\cdot\left(\prod_{i=1}^m(r_i+1)\right)$$
since the product does not depend on $j$.
Sanity checks:


*

*If the values of $r_i$ are all large, then $\frac{r_i}{r_i+1}\approx1$ so you get the number of edges approximately as the number of vertices times the number of directions. Makes sense since most vertices have one (directed) edge for each direction.

*If one of the $r_i$ is zero, nothing changes since the contribution to the sum is $0$ and the contribution to the product is $1$. Makes sense since it allows you to add more $p_{m+1}^0$ to the prime factorization without affecting the result.

