Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find the common divisors of two or more integers
ResourceFunction["CommonDivisors"][{n1,n2,…}] gives the common divisors of the integers ni. | |
ResourceFunction["CommonDivisors"][n] gives the integer divisors of an integer n. |
Find the common divisors of a list of integers:
In[1]:= |
Out[1]= |
Find the divisors of a single integer:
In[2]:= |
Out[2]= |
Find the common divisors of a list of powers:
In[3]:= |
Out[3]= |
CommonDivisors can handle Gaussian integers:
In[4]:= |
Out[4]= |
Make a table showing that the first five primes share no proper common divisors other than 1:
In[5]:= |
Out[5]= |
In[6]:= |
Out[6]= |
The input to CommonDivisors must consist of exact, not approximate, numbers:
In[7]:= |
Out[7]= |
This work is licensed under a Creative Commons Attribution 4.0 International License