### The Maxima on-line user's manual

Algebra Calculator

#### Divisors

Function: divisors (<n>) Represents the set of divisors of <n>.

`divisors(<n>)` simplifies to a set of integers when <n> is a nonzero integer. The set of divisors includes the members 1 and <n>. The divisors of a negative integer are the divisors of its absolute value.

`divisors` distributes over equations, lists, matrices, and sets.

Examples:

We can verify that 28 is a perfect number: the sum of its divisors (except for itself) is 28.

```          (%i1) s: divisors(28);
(%o1)                 {1, 2, 4, 7, 14, 28}
(%i2) lreduce ("+", args(s)) - 28;
(%o2)                          28```

`divisors` is a simplifying function. Substituting 8 for `a` in `divisors(a)` yields the divisors without reevaluating `divisors(8)`.

```          (%i1) divisors (a);
(%o1)                      divisors(a)
(%i2) subst (8, a, %);
(%o2)                     {1, 2, 4, 8}```

`divisors` distributes over equations, lists, matrices, and sets.

```          (%i1) divisors (a = b);
(%o1)               divisors(a) = divisors(b)
(%i2) divisors ([a, b, c]);
(%o2)        [divisors(a), divisors(b), divisors(c)]
(%i3) divisors (matrix ([a, b], [c, d]));
[ divisors(a)  divisors(b) ]
(%o3)             [                          ]
[ divisors(c)  divisors(d) ]
(%i4) divisors ({a, b, c});
(%o4)        {divisors(a), divisors(b), divisors(c)}```

```(%o1)                                true
(%i2) ```

### Related Examples

divisors(1009);

Calculate

factor(2800);

divisors(2800);

gcd(68,34);

Calculate

##### divisors

square(x):=x^2;

square(32320953532432...

divisors(D2);

Calculate

factor(42);

divisors(42);

ifactors(42);

Calculate

divisors(28);

Calculate

##### divisors

divisors(3308491);

Calculate

##### divisors-equiv_classes-member

Rel(a, b) := member(8...

Rel(8, 20);

D:divisors(12!);

Calculate

##### divisors

divisors(262158157939...

Calculate

##### divisors-factor-listify-lreduce-map-rat-rest

f(x):= %i *(x + b + c...

g(x):= f(f(x));

h(x):= g(g(x));

Calculate

a : 16800;

b : -990;

divisors(b);

Calculate