Arithmetic & Number Theory

Prime Factorization

Factor n into a product of primes.

Formula

Formula
n = p1a1 · p2a2 ⋯

Variables

SymbolDefinitionType & rangeUnitsRole
n integer ≥ 2 integer (ℤ) — input
pᵢ prime factors computed result — result

Try it yourself

Interactive calculator
Result
—

Worked examples

Example 1
Givenn = 360
Result2 × 2 × 2 × 3 × 3 × 5
Example 2
Givenn = 97
Result97