numlib::primedivisors --
prime factors of an integer
Introductionnumlib::primedivisors(n) returns a list
containing the different prime divisors of the integer
n.
Call(s)numlib::primedivisors(n)
Parametersn |
- | an integer |
Returnsnumlib::primedivisors(n) returns a list of
nonnegative integers.
Related
Functionsifactor, isprime, numlib::divisors, numlib::numdivisors, numlib::numprimedivisors,
numlib::proveprime
Detailsa is a non-zero integer then,
numlib::primedivisors(a) returns the sorted
list of the different prime divisors of a.numlib::primedivisors(0) returns
[0].numlib::primedivisors returns the function call with
evaluated argument if the argument is not a number.numlib::primedivisors returns an error if the argument
evaluates to a number of wrong type.
Example
1We compute the list of prime divisors of the number 6746328388800 (one of the highly composite numbers studied by S. Ramanujan in 1915):
>> numlib::primedivisors(6746328388800)
[2, 3, 5, 7, 11, 13, 17, 19, 23]
Backgroundifactor is used for factoring
n.