Function Repository Resource:

PrimitiveRootOfUnityList

Source Notebook

Get the set of primitive nth roots of unity

Contributed by: Wolfram|Alpha Math Team

ResourceFunction["PrimitiveRootOfUnityList"][n]

returns a list of the nth primitive roots of unity.

Details

An nth root of unity, x, is called a primitive nth root of unity if xn=1 but xm1 for any m<n. For example, the complete set of fourth roots of unity is {-,,1,-1}, but only ± are primitive fourth roots.

Examples

Basic Examples

Find the primitive fifth roots of unity:

In[1]:=
ResourceFunction["PrimitiveRootOfUnityList"][5]
Out[1]=

Notice that 1 is missing from this list, as compared with the full list of the fifth roots of unity returned by the resource function ComplexRoots:

In[2]:=
ResourceFunction["ComplexRoots"][1, 5]
Out[2]=

Publisher

Wolfram|Alpha Math Team

Version History

  • 3.0.1 – 27 March 2023
  • 3.0.0 – 24 January 2020
  • 2.0.0 – 06 September 2019
  • 1.0.0 – 23 August 2019

Related Resources

License Information