WOLFRAM|DEMONSTRATIONS PROJECT

Correlating the Mertens Function with the Farey Sequence

​
r
1
The Möbius function
μ(n)
is defined to be
q
(-1)
if
n
is the product of
q
distinct primes, and zero otherwise, with
μ(1)=1
[1]. The values of the Möbius function are
1,-1,-1,0,-1,1,…
for positive integers
n≥1
.
The Mertens function
M(n)
is defined to be the cumulative sum of the Möbius function,
M(n)=
∑
m≤n
μ(m)
[2], so that the values of the Mertens function are
1,0,-1,-1,-2,-1,…
for positive integers
n≥1
. (In this Demonstration we start the sequence at
n≥3
.)
The Farey sequence
F
n
of order
n
is the set of irreducible fractions between 0 and 1 with denominators less than or equal to
n
, arranged in increasing order [3]. For
n=1,2,…,6
, the new terms are
{0,1}
,

1
2

,

1
3
,
2
3

,

1
4
,
3
4

,

1
5
,
2
5
,
3
5
,
4
5

,

1
6
,
5
6

. Therefore,
F
6
=0,
1
6
,
1
5
,
1
4
,
1
3
,
2
5
,
1
2
,
3
5
,
2
3
,
3
4
,
4
5
,
5
6
,1
.
Truncating the Farey sequence to include only the fractions less than
1
2
and omitting 0 and 1, define
f
n
={p/q:p/q<1/2,gcd(p,q)=1,1≤p<n/2,3≤q≤n}
. Define a measure of the Farey sequence distribution by
D(n)=8
∑
δ∈
f
n
1
4
-δ
​
that describes an asymmetry in the distribution of
f
n
about
1
4
[4]. Then the values of
D(n)
are
-
2
3
,-
2
3
,-
22
15
,-
4
5
,…
.
This Demonstration compares the Mertens function values (red) with
D(n)
(yellow), and shows the difference
M(n)-D(n)
in green. The values shown range from
100(r-1)
to
100r
.