It takes time to count the divisors of 72 one by one. But once you have its prime factorization, you can get the number immediately with a single multiplication. Change the number with the slider and check whether the count from the formula always matches the number you count directly.
Why the formula works: The divisors of 72 = 2³×3² are all the combinations obtained by choosing “0 to 3 copies of 2 and 0 to 2 copies of 3” and multiplying them. There are 4 ways to choose the exponent of 2 (0, 1, 2, or 3) and 3 ways to choose the exponent of 3 (0, 1, or 2), so by the multiplication principle, there are 4×3=12 combinations.
In general, if n has the prime factorization n = pa×qb×⋯, then the number of divisors is (a+1)×(b+1)×⋯. The formula also immediately shows that a prime number (for example, 7=7¹) has exactly (1+1)=2 divisors: 1 and itself.