Prime Factorization

Split an integer into prime powers.

Example result

Prime factors: 2^2 × 3^3 × 7

Step by step

  1. Divide by each candidate prime as many times as possible.
  2. If a remainder greater than one survives, append it as a prime factor.