Divisors - Maple Help

# Online Help

###### All Products    Maple    MapleSim

NumberTheory

 Divisors
 the set of positive divisors of an integer

 Calling Sequence Divisors(n)

Parameters

 n - integer

Description

 • The Divisors function computes the set of positive divisors of n.
 • Every positive integer is a divisor of 0, but one cannot represent the set of all positive integers as an enumerated set. Therefore, Divisors(0) returns an error.

Examples

 > $\mathrm{with}\left(\mathrm{NumberTheory}\right):$
 > $\mathrm{Divisors}\left(-12\right)$
 $\left\{{1}{,}{2}{,}{3}{,}{4}{,}{6}{,}{12}\right\}$ (1)
 > $\mathrm{Divisors}\left(1\right)$
 $\left\{{1}\right\}$ (2)
 > $\mathrm{Divisors}\left(57\right)$
 $\left\{{1}{,}{3}{,}{19}{,}{57}\right\}$ (3)
 > $\mathrm{andmap}\left(d↦\mathbf{not}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}2\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}\mathbf{in}\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}d,\left[\mathrm{seq}\left(\mathrm{Divisors}\left(4n-1\right),n=1..10\right)\right]\right)$
 ${\mathrm{true}}$ (4)
 > $\mathrm{Divisors}\left(101\right)$
 $\left\{{1}{,}{101}\right\}$ (5)
 > $\mathrm{Divisors}\left(0\right)$

Compatibility

 • The NumberTheory[Divisors] command was introduced in Maple 2016.
 • For more information on Maple 2016 changes, see Updates in Maple 2016.

 See Also