PrimeFactors
Finds the prime factors of a positive integer.
Syntax
-
PrimeFactors(n)
-
n
is a positive integer
-
Description
If n
is a positive integer, then PrimeFactors(n)
is the sorted list of prime factors of n
, that is, the unique sorted list of prime numbers whose product is n
.
Examples
PrimeFactors(1)
(empty list)
PrimeFactors(652358510)
2 5 17 3837403
PrimeFactors(6454824420)
2 2 3 5 11 23 53 71 113
PrimeFactors(4096)
2 2 2 2 2 2 2 2 2 2 2 2
PrimeFactors(362014271)
362014271
∏(unique(PrimeFactors(19871226)))
6623742