Greatest Common Divisor of Integers/Examples

From ProofWiki
Jump to navigation Jump to search

Examples of Greatest Common Divisors of Integers

$12$ and $-8$

The greatest common divisor of $12$ and $-8$ is:

$\gcd \set {12, -8} = 4$


$-12$ and $30$

The greatest common divisor of $-12$ and $30$ is:

$\gcd \set {-12, 30} = 6$


$-5$ and $5$

The greatest common divisor of $-5$ and $5$ is:

$\gcd \set {-5, 5} = 5$


$8$ and $17$

The greatest common divisor of $8$ and $17$ is:

$\gcd \set {8, 17} = 1$

That is, $8$ and $17$ are coprime.


$-8$ and $-36$

The greatest common divisor of $-8$ and $-36$ is:

$\gcd \set {-8, -36} = 4$


$n$ and $0$

Let $n \in \Z_{>0}$.

The greatest common divisor of $n$ and $0$ is:

$\gcd \set {n, 0} = n$


$20$, $70$ and $80$

The greatest common divisor of $20$, $70$ and $80$ is:

$\gcd \set {20, 70, 80} = 10$