A factor of a number n is any positive integer that divides n without a remainder. Prime factorization is the unique way to write n as a product of prime numbers. By the Fundamental Theorem of Arithmetic, every integer greater than 1 has exactly one prime factorization.
If n = p₁^a₁ × p₂^a₂ × ... × pₖ^aₖ (prime factorization)
Then: number of factors = (a₁+1)(a₂+1)...(aₖ+1)
Example: 360 = 2³ × 3² × 5¹
Factors = (3+1)(2+1)(1+1) = 4×3×2 = 24 factors
Sum of factors formula:
σ(n) = [(p₁^(a₁+1)−1)/(p₁−1)] × [(p₂^(a₂+1)−1)/(p₂−1)] × ...
How do you find all factors of a number?
To find all factors of n: check every integer from 1 to √n. For each i where n%i=0, both i and n/i are factors. This works because factors come in pairs (a × b = n, where a ≤ √n ≤ b). For example, √360 ≈ 18.97, so check 1–18. This is much faster than checking all the way to n.
Why do perfect squares have an odd number of factors?
Normally factors come in pairs (a × b = n with a ≠ b). In a perfect square, one factor pair has both elements equal (√n × √n = n). This unpaired factor means the total count is odd. For example, 36: factors are 1, 2, 3, 4, 6, 9, 12, 18, 36 — nine factors. The middle one (6 = √36) stands alone.
What is a highly composite number?
A highly composite number has more factors than any smaller positive integer. The sequence begins: 1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720... These numbers are useful in applications where you want maximum divisibility — 360° in a circle, 60 minutes in an hour, and 24 hours in a day are all highly composite.
What is a perfect number?
A perfect number equals the sum of its proper factors (all factors except itself). The first four are 6 (1+2+3=6), 28 (1+2+4+7+14=28), 496, and 8128. All known perfect numbers are even, and all have the form 2^(p−1)×(2^p−1) where 2^p−1 is prime (a Mersenne prime). Whether any odd perfect numbers exist is an unsolved mathematical problem.