JavaScript:实现N数理论(质素相关)算法
/*
In number theory, two integers a and b are coprime, relatively prime or
mutually prime if the only positive integer that is a divisor of both
of them is Consequently, any prime number that divides one of a
or b does not divide the other. This is equivalent to their greatest
common divisor (gcd) being. One says also a is prime to b or a
is coprime with b.
*/
// Here we use a GetEuclidGCD method as a utility.
const GetEuclidGCD = (arg1