# is_coprime function

Test whether two whole numbers have no common divisor above 1.

## How to write it

### is_coprime(a, b)

**a**

A whole number. Takes a whole number.

**b**

A whole number. Takes a whole number.

## Examples

- $\displaystyle \operatorname{is\_coprime}(8, 15) = \operatorname{true}$

  `is_coprime(8, 15)`

  In the solver, `is_coprime(8, 15)` gives `true`.

  [Open in the solver](https://hilberon.com/?q=is_coprime%288%2C%2015%29)

## Related functions

- [is_prime](https://hilberon.com/library/is_prime)

  Test whether a whole number is prime.
- [integer_partitions](https://hilberon.com/library/integer_partitions)

  All the ways to write a whole number as a sum of positive whole numbers.
- [is_prime_power](https://hilberon.com/library/is_prime_power)

  Test whether a whole number is a power of a prime.
- [integer_exponent](https://hilberon.com/library/integer_exponent)

  The exponent of a prime in a whole number.
- [is_square_free](https://hilberon.com/library/is_square_free)

  Test whether no square greater than 1 divides a whole number.
- [harmonic_number](https://hilberon.com/library/harmonic_number)

  The n-th harmonic number: 1 + 1/2 + ... + 1/n.

---
Source: https://hilberon.com/library/is_coprime
