The greatest common divisor of two integers, m and n, is the largest positive integer that divides both numbers without a remainder. The top level igcd common computes the greatest common divisor of two numbers:
>

$\mathrm{igcd}\left(4\,10\right)$

>

$\mathrm{igcd}\left(17\,19\right)$

Another method for finding the gcd of two numbers is by using the extended Euclidean algorithm for integers, igcdex. This solves $g$ = $sx+ty$ = $\mathrm{igcd}\left(s\,t\right)$.
>

$\mathrm{igcdex}\left(17\,19\,'s'\,'t'\right)$

>

$\left[s\,t\right]$

$\left[{9}{\,}{\mathrm{8}}\right]$
 (4) 
>

$\mathrm{is}\left(17s+19t=1\right)$

The integer remainder of an integer, m, divided by n can be found using the irem command. The iquo command computes the integer quotient of m divided by n.
>

$\mathrm{irem}\left(10\,3\right)$

>

$\mathrm{iquo}\left(10\,3\right)$

If the iquo command is called with an optional third argument that specifies a name, the result for the remainder is stored in the given name. The converse is also true for the irem command:
>

$\mathrm{irem}\left(28\,5\,'\mathrm{quot}'\right)$

The Divisors command from the Number Theory package returns all divisors for an integer:
>

$\mathrm{Divisors}\left(6\right)$

$\left\{{1}{\,}{2}{\,}{3}{\,}{6}\right\}$
 (10) 
The SumOfDivisors command returns the sum of the divisors on an integer, including the integer:
>

$\mathrm{SumOfDivisors}\left(6\right)$
