Function Repository Resource:

# JordanTotient

Evaluate Jordan's totient function

Contributed by: Jan Mangaldan
 ResourceFunction["JordanTotient"][k,n] gives the Jordan totient function Jk(n).

## Details

Integer mathematical function, suitable for both symbolic and numerical manipulation.
The Jordan totient function Jk(n) gives the number of k-tuples of positive integers that are less than or equal to n that form a coprime (k+1)-tuple together with n.
For a number with u a unit and pi primes, ResourceFunction["JordanTotient"][k,n] gives .
ResourceFunction["JordanTotient"][1,n] is equivalent to EulerPhi[n].

## Examples

### Basic Examples (2)

Evaluate J1(10):

 In[1]:=
 Out[1]=

Plot JordanTotient with log-scaled values:

 In[2]:=
 Out[2]=

### Scope (2)

Show a table of Jordan totients:

 In[3]:=
 Out[3]=

 In[4]:=
 Out[4]=

### Applications (2)

Verify Gegenbauer's formula:

 In[5]:=
 Out[5]=

A formula for the logarithmic derivative of a cyclotomic polynomial evaluated at 1 due to Lehmer:

 In[6]:=
 Out[6]=

### Properties and Relations (5)

JordanTotient[1,n] is the same as EulerPhi[n]:

 In[7]:=
 Out[7]=

JordanTotient is a multiplicative function:

 In[8]:=
 Out[8]=

where p is prime:

 In[9]:=
 Out[9]=

JordanTotient[k,n] counts the number of k-tuples n that form a coprime (k+1)-tuple together with n:

 In[10]:=
 Out[10]=
 In[11]:=
 Out[11]=

The power function can be expressed as a divisor sum of Jordan totients:

 In[12]:=
 Out[12]=

### Neat Examples (1)

Plot the Ulam spiral with numbers colored based on the values of JordanTotient:

 In[13]:=
 In[14]:=
 Out[14]=

## Version History

• 1.0.0 – 10 March 2021