 #### How many divisors does a number have?

Suppose you wish to find the number of divisors of 48. Starting with 1 we can work through the set of natural numbers and test divisibility in each case, noting that divisors can be listed in factor pairs.

48 = 1×48 = 2×24 = 3×16 = 4×12 = 6×8

Hence we can see that 48 has exactly ten divisors. It should also be clear that, using this method, we only ever need to work from 1 up to the square root of the number.

Although this method is quick and easy with small numbers, it is tedious and impractical for larger numbers. Fortunately there is a quick and accurate method using the divisor, or Tau, function.

Let d(n) be the number of divisors for the natural number, n.

We begin by writing the number as a product of prime factors: n = paqbrc...
then the number of divisors, d(n) = (a+1)(b+1)(c+1)...

To prove this, we first consider numbers of the form, n = pa. The divisors are 1, p, p2, ..., pa; that is, d(pa)=a+1.

Now consider n = paqb. The divisors would be:

 1 p p2 ... pa q pq p2q ... paq q2 pq2 p2q2 ... paq2 ... ... ... ... ... qb pqb p2qb ... paqb

Hence we prove that the function, d(n), is multiplicative, and in this particular case, d(paqb)=(a+1)(b+1). It should be clear how this can be extended for any natural number which is written as a product of prime factors.

The number of divisor function can be quickly demonstrated with the example we considered earlier: 48 = 24×31, therefore d(48)=5×2=10.