1618.dev

small tools, one committed a day

Prime Factorization

Break any integer into its unique product of primes — plus all divisors, divisor count, and divisor sum.

How it works

Every integer greater than 1 has a unique factorization into primes (the fundamental theorem of arithmetic). We strip out factors of 2 and 3 first, then trial-divide by candidates of the form 6k ± 1 up to √n — all composites have a prime factor ≤ √n, so anything left after that loop is itself prime. From the prime powers we generate every divisor and compute divisor count and sum.