How can you find the number of positive divisors of a natural number without listing all the divisors?
What you are trying to do is called the tau function - the
number of positive divisors of a natural number, n, is written as
tau(n). How to do it:
Simplify your number into its prime factors.
For example, 84 = 4 * 3 * 7 = (2^2) * (3^1) * (7^1).
Then, make a list of all the powers from the previous step. This
gives us a list of 2, 1, and 1.
Add one to every number in the list. Our list is now 3, 2, and
2.
Multiply all the numbers in the list together, and you're done.
3 * 2 * 2 = 12.
84 has 12 positive divisors, which is easily verified:
1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, and 84.