Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Evaluate the Dedekind psi function
ResourceFunction["DedekindPsi"][n] gives the Dedekind psi function ψ(n). | |
ResourceFunction["DedekindPsi"][k,n] gives the generalized Dedekind psi function ψk(n). |
Evaluate ψ(3):
In[1]:= | ![]() |
Out[1]= | ![]() |
Evaluate ψ(2,8):
In[2]:= | ![]() |
Out[2]= | ![]() |
Plot ψ(k,n) for several values of k on a logarithmic scale:
In[3]:= | ![]() |
Out[3]= | ![]() |
DedekindPsi threads elementwise over lists for either argument:
In[4]:= | ![]() |
Out[4]= | ![]() |
In[5]:= | ![]() |
Out[5]= | ![]() |
In[6]:= | ![]() |
Out[6]= | ![]() |
Obtain a symbolic expression for arbitrary order k:
In[7]:= | ![]() |
Out[7]= | ![]() |
In[8]:= | ![]() |
Out[8]= | ![]() |
DedekindPsi[k,n] remains unevaluated for symbolic n:
In[9]:= | ![]() |
Out[9]= | ![]() |
Now specify a value:
In[10]:= | ![]() |
Out[10]= | ![]() |
The Dirichlet transform of DedekindPsi can be expressed in terms of Zeta:
In[11]:= | ![]() |
Out[11]= | ![]() |
The average order of DedekindPsi[n] is :
In[12]:= | ![]() |
Out[12]= | ![]() |
DedekindPsi[k,n] can be expressed as a quotient of Jordan’s generalized totients :
In[13]:= | ![]() |
Out[13]= | ![]() |
In[14]:= | ![]() |
Out[14]= | ![]() |
DedekindPsi[k,n] is a multiplicative function:
In[15]:= | ![]() |
Out[15]= | ![]() |
In[16]:= | ![]() |
Out[16]= | ![]() |
In[17]:= | ![]() |
Out[17]= | ![]() |
If n is squarefree, DedekindPsi[k,n] = DivisorSigma[k,n]:
In[18]:= | ![]() |
Out[18]= | ![]() |
In[19]:= | ![]() |
Out[19]= | ![]() |
In[20]:= | ![]() |
Out[20]= | ![]() |
When the order is zero, all terms in the defining product degenerate to 2, i.e. DedekindPsi[0,n] degenerates to 2^PrimeNu[n]:
In[21]:= | ![]() |
Out[21]= | ![]() |
In[22]:= | ![]() |
Out[22]= | ![]() |
DedekindPsi[k,n] can be expressed as μ(n)2⋆nk where ⋆ is DirichletConvolve:
In[23]:= | ![]() |
Out[23]= | ![]() |
In[24]:= | ![]() |
Out[25]= | ![]() |
However, for large n, this calculation is slower:
In[26]:= | ![]() |
Out[27]= | ![]() |
DedekindPsi[0] is undefined:
In[28]:= | ![]() |
Out[28]= | ![]() |
Plot the Ulam spiral where numbers are colored based on the values of DedekindPsi:
In[29]:= | ![]() |
Out[30]= | ![]() |
Verify that small Mersenne primes p satisfy ψ(2(ψ(n)−n)-1)=n where n=p+1:
In[31]:= | ![]() |
Out[31]= | ![]() |
In[32]:= | ![]() |
Out[32]= | ![]() |
Wolfram Language 13.0 (December 2021) or above
This work is licensed under a Creative Commons Attribution 4.0 International License