Section 23.3 Making New Functions
Subsection 23.3.1 First new functions
In order to see what good this does, let's see what happens when we mess around and make Dirichlet products with functions we know. We already know two of these functions, and I give you a third.Definition 23.3.1.
We define a new simple arithmetic function to go along with those from Definition 19.2.9.
for all for all
xxxxxxxxxx
def u(n): return 1
def N(n): return n
def I(n): return floor(1/n)
def DirichletProduct(f,g,n): return sum(f(d)*g(n/d) for d in divisors(n))
xxxxxxxxxx
def _(n=10):
H = [['$i$',r'$(N\star \mu)(i)$']]
T = [(i,DirichletProduct(N,moebius,i)) for i in [1..n]]
pretty_print(html(table(H+T, header_row=True, frame=True )))
xxxxxxxxxx
def _(n=10):
H = [['$i$',r'$(\phi\star u)(i)$']]
T = [(i,DirichletProduct(u,euler_phi,i)) for i in [1..n]]
pretty_print(html(table(H+T, header_row=True, frame=True )))
Fact 23.3.2.
We may identify the following Dirichlet products as known functions.
Subsection 23.3.2 More new functions
Next, please try computing the Moebius inversions of our old friends,xxxxxxxxxx
xxxxxxxxxx
def _(n=10):
H = [['$i$',r'$(\tau\star \mu)(i)$']]
T = [(i,DirichletProduct(lambda y: sigma(y,0),moebius,i)) for i in [1..n]]
pretty_print(html(table(H+T, header_row=True, frame=True )))
xxxxxxxxxx
def _(n=10):
H = [['$i$',r'$(\sigma\star \mu)(i)$']]
T = [(i,DirichletProduct(sigma,moebius,i)) for i in [1..n]]
pretty_print(html(table(H+T, header_row=True, frame=True )))
xxxxxxxxxx
def _(n=10):
H = [['$i$',r'$(\mu\star \mu)(i)$']]
T = [(i,DirichletProduct(moebius,moebius,i)) for i in [1..n]]
pretty_print(html(table(H+T, header_row=True, frame=True )))
xxxxxxxxxx
def _(n=10):
H = [['$i$',r'$(u\star u)(i)$']]
T = [(i,DirichletProduct(u,u,i)) for i in [1..n]]
pretty_print(html(table(H+T, header_row=True, frame=True )))
Definition 23.3.3.
If
then we can give the name
Definition 23.3.4.
If
This is called Liouville's function.
What is the value for primes?
What is the
product of this with something – say,
xxxxxxxxxx
def u(n): return 1
def N(n): return n
def I(n): return floor(1/n)
def omega(n): return len(n.prime_divisors())
def liouville(n): return (-1)^sum([z[1] for z in n.factor()])
def DirichletProduct(f,g,n): return sum(f(d)*g(Integer(n/d)) for d in divisors(n))
xxxxxxxxxx
def _(n=10,f=[liouville,u,N,moebius,omega,I], g=[liouville,u,N,moebius,omega,I]):
H = [['$i$',r'$(%s\star %s)(i)$'%(f,g)]]
T = [(i,DirichletProduct(f,g,i)) for i in [1..n]]
pretty_print(html(table(H+T, header_row=True, frame=True )))