%mathpiper,def="IsCoprime"

5  # IsCoprime(list_IsList)                     <-- (Lcm(list) = Product(list));
10 # IsCoprime(n_IsInteger,m_IsInteger)		<-- (Gcd(n,m) = 1);

%/mathpiper



%mathpiper_docs,name="IsCoprime",categories="User Functions;Number Theory;Predicates"
*CMD IsCoprime --- test if integers are coprime 
*STD
*CALL
	IsCoprime(m,n)
	IsCoprime(list)
*PARMS

{m},{n} -- positive integers

{list}  -- list of positive integers

*DESC

This function returns {True} if the given pair or list of integers are coprime,
also called relatively prime. A pair or list of numbers are coprime if they 
share no common factors.

*E.G.

In> IsCoprime({3,4,5,8})
Result: False;
In> IsCoprime(15,17)
Result: True;

*SEE Prime
%/mathpiper_docs