close

Function Repository Resource:

IntegerRadical

Source Notebook

Return the radical of an integer, the product of its distinct prime factors

Contributed by: Ed Pegg Jr

ResourceFunction["IntegerRadical"][n]

returns the integer radical of an integer n.

Details and Options

Integer mathematical function, suitable for both symbolic and numerical manipulation.
The integer radical is also known as the squarefree kernel or largest squarefree divisor.
ResourceFunction["IntegerRadical"] gives the product of the distinct prime factors.
For a number Image with u a unit and pi primes, ResourceFunction["IntegerRadical"][n] returns p1pm.
ResourceFunction["IntegerRadical"][n,GaussianIntegersTrue] evaluates the integer radical over Gaussian integers.
ResourceFunction["IntegerRadical"][m+I n] automatically works over Gaussian integers.

Examples

Basic Examples (1) 

The product of distinct prime factors of a few numbers:

In[1]:=
abc = {-1, -2  3^7, 7 5^4};
ResourceFunction["IntegerRadical"][abc]
Out[1]=
Image

Scope (2) 

Some examples of a+b=c:

In[2]:=
high = {
   {-2, -109 3^10, 23^5},
   {-11^2, -3^2 5^6 7^3, 23 2^21}, {-19 1307, - 7 29^2 31^8, 2^8 3^22  5^4},
   {-283, - 5^11  13^2, 2^8 3^8  17^3},
   {-1, -2  3^7, 7 5^4},
   {-7^3, -3^10, 29 2^11},
   {-7^2 41^2 311^3, -11^16 13^2 79, 2 3^3 5^23 953},
   {-5^3, -2^9 3^17 13^2, 11^5 17 31^3 137},
   {-13 19^6, -2^30 5, 3^13 11^2 31},
   {-37, -2^15, 3^8 5},
   {-1, -2^5 3 5^2, 7^4},
   {-3^5 7, -5^6 67, 2^20},
   {-2^10 7, -5^7, 3^8 13},
   {-3, -5^3, 2^7},
   {-5, -3^11, 2^10 173}};
Total /@ high
Out[2]=
Image

Quality values for these examples of the abc conjecture:

In[3]:=
Grid[Append[ResourceFunction["InactiveFactorInteger"][Abs[#]] & /@ #, N[Log[Last[#]]/
      Log[ResourceFunction["IntegerRadical"][Times @@ #]]]] & /@ high]
Out[3]=
Image

Gaussian integers are supported:

In[4]:=
ArrayPlot[
 Table[Abs[
    ResourceFunction["IntegerRadical"][a + b I, GaussianIntegers -> True]]^2, {a, 1, 30}, {b, 1, 30}], PixelConstrained -> 4, Frame -> False]
Out[4]=
Image

Version History

  • 1.0.0 – 01 March 2021

Related Resources

License Information