๐ข Prime Factorization
Factorizes an integer into its prime factors, shown in exponent notation (e.g. 360 = 2ยณ ร 3ยฒ ร 5), and automatically calculates its divisor count and divisor sum. Useful for studying number theory or understanding GCD/LCM more deeply.
How to use
- Enter an integer (1 or greater) to factorize.
- The prime factorization is shown in exponent notation.
- The divisor count, divisor sum, and whether the number is prime are shown as well.
How the calculation works
Prime factorisation writes an integer as a product of primes (numbers greater than 1 divisible only by 1 and themselves). Every integer has exactly one prime factorisation (the fundamental theorem of arithmetic). This tool uses trial division: divide by 2, 3, 4 โฆ as many times as possible, stopping once the divisor squared exceeds what is left. Anything greater than 1 that remains is itself prime. Integers up to one trillion (10ยนยฒ) are supported. From the factorisation it also calculates the number and sum of divisors. For n = pโ^eโ ร pโ^eโ ร โฆ Number of divisors = (eโ + 1)(eโ + 1) โฆ Sum of divisors = (1 + pโ + โฆ + pโ^eโ)(1 + pโ + โฆ + pโ^eโ) โฆ
Worked example
360 = 2ยณ ร 3ยฒ ร 5 Number of divisors: (3+1)(2+1)(1+1) = 24 Sum of divisors: (1+2+4+8)(1+3+9)(1+5) = 15 ร 13 ร 6 = 1,170 28 = 2ยฒ ร 7 Its divisors sum to 56; excluding 28 itself they sum to 28, making it a "perfect number". 999,999,999,989 is prime (the largest prime below one trillion)
Things to be aware of
- 1 is not a prime, and its factorisation is empty.
- The difficulty of factoring very large numbers is what RSA encryption relies on.
- Prime factorisation also helps with simplifying fractions and finding least common multiples.
FAQ
How is the divisor count calculated?
Add 1 to each prime factor's exponent, then multiply those together (e.g. 360 = 2ยณร3ยฒร5ยน โ (3+1)ร(2+1)ร(1+1) = 24 divisors).
What happens if I enter 1?
1 is treated as a special case with no prime factors; it has exactly one divisor (itself).
How large a number can this handle?
Integers up to one trillion (10ยนยฒ). Beyond that, trial-division factorization becomes too slow.