Prime factorization and the fundamental theorem
5 min read
Short answer
Every integer is a product of primes, and the factorization is unique apart from order: . Exponents reveal everything: the number of divisors is .
Finding the factorization
Divide by the smallest prime that works, repeat, and stop when the quotient is . You only need to test primes up to , because a composite number has a prime factor no larger than its square root.
gcd and lcm from exponents
For each prime take the smaller exponent for the gcd and the larger for the lcm. Together .
Worked example
Factor , count its divisors, and find .
, so it has divisors. Also . Smaller exponents: . So .
Try it yourself
How many positive divisors does have?
Show the answer
, so the count is .
Keep going with practice
Vidi's counting lessons use the multiplication rule, the same idea behind the divisor-count formula.