|
Generate prime factors for numbers up to 10^15.

Download (13KB)
Generate distinct prime factors only. For each N, each prime factor is listed once.

Download (14KB)
For example, the complete prime factorization of 1000000 is:
2 * 2 * 2 * 2 * 2 * 2 * 5 * 5 * 5 * 5 * 5 * 5
The distinct prime factors are 2 and 5, and the number of distinct factors is 2.
The number of distinct prime factors is the subject of the Erdős–Kac theorem. They are denoted ω(n). So ω(1000000) = 2. |