The Number Of Positive Divisors Of An Integer N D N
Table of Contents

The Number of Positive Divisors of an Integer
In number theory, we denote the function d(n) to be the number of positive divisors of an integer n. For example, the integer 18 has positive divisors 1, 2, 3, 6, 9, and 18. Thus d(18) = 6, since there are strictly 6 positive divisors of 18. Thus:
(1)\begin{align} d(n) = \sum_{d \mid n} 1 \end{align}
Lemma 1: If p is a prime, then d(p) = 2.
 Proof: By definition, a prime only has two positive divisors which are namely 1 and p. Thus d(p) = 2.
Lemma 2: If p is a prime, then d(p^{2}) = 3.
 Proof: By definition, a prime only has two positive divisors which are namely 1 and p. Hence 1  p^{2}, and p  p^{2}, but also p^{2}  p^{2}. Thus d(p^{2}) = 3.
Lemma 3: If p is a prime, then for e = 1, 2, 3, … d(p^{e}) = e + 1.
 Proof: Suppose that we have the prime p raised to the e^{th} power. It thus follows that the divisors of p^{e} are 1, p, p^{2}, p^{3}, …, p^{e1}, p^{e}. So in total, there are e + 1 positive factors of p^{e}, so d(p^{e}) = e + 1
Lemma 4: If p and q are prime, then d(pq) = 4.
 Proof: Since p and q are prime, the 1  pq, p  pq, q  pq, and of course pq  pq. Thus there are exactly 4 positive divisors of pq, and thus d(pq) = 4.