A worked example: the prime factorization of 84
Run 84 through the Prime Factorization Calculator and it returns 2^2 × 3 × 7, with 2, 3, and 7 listed as the distinct prime factors. That means 84 breaks down as 2 × 2 × 3 × 7 — four prime multiplications in total, using three different primes, one of which (2) appears twice.
The formula: dividing out the smallest prime repeatedly
The calculator starts at the smallest possible prime, 2, and keeps dividing the number by it for as long as it divides evenly, counting how many times that happens before moving up to the next prime. Feed it 1000 and it returns 2^3 × 5^3, with primeFactorsList showing just 2, 5 — only two distinct primes are involved, but each is raised to the third power (2 × 2 × 2 × 5 × 5 × 5 = 1000). Compare that to 84's result: 1000 uses fewer distinct primes than 84 (two versus three), but raises each one to a higher power.
A prime number's prime factorization: 97
Run 97 through the same calculator and the result is simply 97, with primeFactorsList showing only 97 itself. This is what happens whenever the input is already prime: the calculator cannot divide out any smaller prime, so the "factorization" is just the number on its own, raised to the first power.
Why prime factorization is unique
Every one of these three results — 84 as 2^2 × 3 × 7, 1000 as 2^3 × 5^3, and 97 as itself — is the only possible way to write that number as a product of primes, ignoring the order you multiply them in. This is the Fundamental Theorem of Arithmetic, and it is what makes prime factorization useful as a kind of fingerprint: no two different whole numbers greater than 1 ever share the same set of prime factors and exponents, so the factorization uniquely identifies the number it came from.