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.
u(n)=1 for all n
N(n)=n for all n
I(n)={1n=10n>1
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.
ϕ⋆u=N
N⋆μ=ϕ
ϕ(n)=(N⋆μ)(n)=∑d∣nN(d)μ(nd)=
∑e∣nN(ne)μ(e)=n∑e∣nμ(e)e=n∏p∣n(1−1p).
The middle step follows if we let e=n/d, since that sum will also go through all divisors of n. The last step follows from our initial definition of μ in Definition 23.1.1.Subsection 23.3.2 More new functions
¶Next, please try computing the Moebius inversions of our old friends, σ and τ, by hand for several values. (Hint: try primes and perfect powers first, as they don't have many divisors!) You can try something out here in Sage as well.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
n=k∏i=1peii
then we can give the name ω(n)=k to the number of unique prime divisors of an integer. (This is sometimes called ν(n) in the literature.)
Definition 23.3.4.
If n=∏ki=1peii, we summarize the parity of the total powers of primes dividing a number as
λ(n)=(−1)e1+e2+⋯+ek.
This is called Liouville's function.
What is the value for primes?
What is the ⋆ product of this with something – say, u?
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 )))