dopecalc

Prime Factorization Calculator

Decompose any positive integer into its prime factors. Displays the result as a product of prime powers and includes a factor tree visualization.

Enter a positive integer greater than 1.

About this Calculator

Decompose any positive integer into its prime factors. Displays the result as a product of prime powers and includes a factor tree visualization.

Formula & Calculations

Formula

n = p1^e1 × p2^e2 × ... × pk^ek, where each pi is prime
Where:
  • n=A positive integer greater than 1 to be factorized
  • p1, p2, ..., pk=The distinct prime factors of n
  • e1, e2, ..., ek=The exponent (multiplicity) of each prime factor

Assumptions

  • Every integer greater than 1 has a unique prime factorization (Fundamental Theorem of Arithmetic).
  • Trial division up to sqrt(n) is used, which is efficient for moderate-sized numbers.
  • The number 1 has no prime factors (empty product).

Calculation Examples

Example 1

Inputs:60
Result:60 = 2^2 × 3 × 5

60 ÷ 2 = 30, 30 ÷ 2 = 15, 15 ÷ 3 = 5. Prime factors: two 2s, one 3, one 5.

Example 2

Inputs:97
Result:97 = 97 (prime number)

97 is a prime number; its only prime factor is itself.

Frequently Asked Questions

What is the Fundamental Theorem of Arithmetic?

It states that every integer greater than 1 can be represented uniquely as a product of prime numbers, up to the order of the factors. This is why prime factorization is so fundamental to number theory.

How do you check if a number is prime?

A prime number has exactly two distinct positive divisors: 1 and itself. To check, test divisibility by primes up to sqrt(n). If no divisor is found, n is prime.