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
is_coprime(8, 15)In the solver,
Open in the solveris_coprime(8, 15)givestrue.
Related functions
- is_prime
Test whether a whole number is prime.
- integer_partitions
All the ways to write a whole number as a sum of positive whole numbers.
- is_prime_power
Test whether a whole number is a power of a prime.
- integer_exponent
The exponent of a prime in a whole number.
- is_square_free
Test whether no square greater than 1 divides a whole number.
- harmonic_number
The n-th harmonic number: 1 + 1/2 + ... + 1/n.