## `numlib::primedivisors` -- prime factors of an integer

#### Introduction

`numlib::primedivisors``(n)` returns a list containing the different prime divisors of the integer `n`.

#### Call(s)

`numlib::primedivisors(n)`

#### Parameters

`n` | - | an integer

#### Returns

`numlib::primedivisors``(n`) returns a list of nonnegative integers.

#### Related Functions

`ifactor`, `isprime`, `numlib::divisors`, `numlib::numdivisors`, `numlib::numprimedivisors`, `numlib::proveprime`

#### Details

- If `a` 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 1

We 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]

#### Background

- Internally, `ifactor` is used for factoring `n`.

#### Changes

- no changes

Do you have questions or comments?
Copyright © SciFace Software GmbH & Co. KG 2000