Directory UMM :Journals:Journal_of_mathematics:OTHER:

1

2
3

47

6

Journal of Integer Sequences, Vol. 13 (2010),
Article 10.8.1

23 11

A Survey of Gcd-Sum Functions
L´aszl´o T´oth
Department of Mathematics
University of P´ecs
Ifj´
us´ag u. 6
7624 P´ecs

Hungary
ltoth@gamma.ttk.pte.hu
Abstract
We survey properties of the gcd-sum function and of its analogs. As new results,
we establish asymptotic formulae with remainder terms for the quadratic moment and
the reciprocal of the gcd-sum function and for the function defined by the harmonic
mean of the gcd’s.

1

Introduction

The gcd-sum function, called also Pillai’s arithmetical function is defined by
P (n) =

n
X

gcd(k, n).


(1)

k=1

By grouping the terms according to the values of gcd(k, n) we have
X
P (n) =
d φ(n/d),

(2)

d|n

where φ is Euler’s function.
Properties of the function P , which arise from the representation (2), as well as various
generalizations and analogs of it were investigated by several authors. It is maybe not
surprising that some of these results were rediscovered for many times.
It follows from (2) that the arithmetic mean of gcd(1, n), . . . , gcd(n, n) is given by
A(n) =


P (n) X φ(d)
=
.
n
d
d|n

1

(3)

The harmonic mean of gcd(1, n), . . . , gcd(n, n) is
H(n) = n

n
X
k=1

1
gcd(k, n)


!−1



= n2 

X
d|n

−1

d φ(d)

.

(4)

In the present paper we give a survey of the gcd-sum function and of its analogs. We
also prove the following results concerning the functions A and H, which seem to have not

appeared in the literature.
Our first result is an asymptotic formula with remainder term for the quadratic moment
of the function A.
Let τ (n) denote, as usual, the number of divisors
P of n. Let α4 be the exponent appearing
in the divisor problem for the function τ4 (n) = d1 d2 d3 d4 =n 1, that is
X
τ4 (n) = x(K1 log3 x + K2 log2 x + K3 log x + K4 ) + O(xα4 +ε ),
(5)
n≤x

for any ε > 0, where K1 = 1/6, K2 , K3 , K4 are constants. It is known that α4 ≤ 1/2 (result
of Hardy and Littlewood) and it is conjectured that α4 = 3/8, cf. Titchmarsh [46, Ch. 12],
Ivi´c et al. [22, Section 4]. If this conjecture were true, then it would follow that α4 < 1/2.
Theorem 1. i) For any ε > 0,
X
A2 (n) = x(C1 log3 x + C2 log2 x + C3 log x + C4 ) + O(x1/2+ε ),

(6)


n≤x

where C1 , C2 , C3 , C4 are constants,


1 Y
1
4
,
C1 = 2
1+ 3 −
π p
p
p(p + 1)

(7)

C2 , C
given by (50) in terms of the constants appearing in the asymptotic formula
P3 , C4 are

2
for n≤x τ (n).
ii) Assume that α4 < 1/2. Then the error term in (6) is O(x1/2 δ(x)), where
δ(x) = exp(−c(log x)3/5 (log log x)−1/5 ),

(8)

with a positive constant c.
iii) If the Riemann hypothesis (RH) is true, then for any real x sufficiently large the error
term in (6) is O(x(2−α4 )/(5−4α4 ) η(x)), where
η(x) = exp((log x)1/2 (log log x)14 ).
(9)
P
Remark 2. Let M (x) = n≤x µ(n) denote the Mertens function,√where µ is the M¨obius
function. The error term of iii) comes from the estimate M (x) ≪ x η(x), the best up to
now, valid under RH and for x large, due to Soundararajan [42]. Note that in a preprint
not yet published
Balazard and Roton [3] have shown that the slightly better estimate

M (x) ≪ x exp((log x)1/2 (log log x)5/2+ε ) holds assuming RH, for every ε > 0 sufficiently

small.
2

Remark 3. If α4 is near 3/8 and RH is true, then the exponent (2 − α4 )/(5 − 4α4 ) is near
13/28 ≈ 0.4642.
Our second result is regarding the function H.
Theorem 4. For any ε > 0,
X H(n)
n≤x

n


= C5 log x + C6 + O x−1+ε ,

(10)

where C5 and C6 are constants,



ζ(2)ζ(3) Y
p−1 X
p2a−1 + 1
C5 =
1− 2
ζ(6)
p − p + 1 a=1 pa−1 (p2a+1 + 1)
p

!

.

(11)

Corollary 5. For any ε > 0,
X
n≤x

H(n) = C5 x + O(xε ),


(12)

hence the mean value of the function H is C5 .
Note that the arithmetic mean of the orders of elements in the cyclic group Cn of order
n is
n
1X
n
1X
=
dφ(d),
(13)
α(n) =
n k=1 gcd(k, n)
n
d|n

hence H(n)/n = 1/α(n). The function α and its average order were investigated by von zur
Gathen et al. [17] and Bordell`es [6].

The paper is organized as follows. Properties of the gcd-sum function P are presented in
Section 2. Generalizations and connections to other functions are given in Section 3. Section
4 includes the proofs of Theorems 1 and 4. Several analogs of the gcd-sum function are
surveyed in Section 5 and certain
P open problems are
P stated in Section 6. Finally, as added in
proof, asymptotic formulae for n≤x 1/P (n) and n≤x 1/g(n), where g is any multiplicative
analog of P discussed in the present paper are given in Section 7.
Throughout the paper we insist on the asymptotic properties of the functions. We remark
that some other aspects, including arithmetical properties and generalizations of the gcd-sum
function are surveyed by Bege [4, Ch. 3] and Haukkanen [20].

2

Properties of the gcd-sum function

According to (2), P = E∗φ in terms of the Dirichlet convolution, with the notation E(n) = n.
It follows that P is multiplicative and for any prime power pa (a ≥ 1),
P (pa ) = (a + 1)pa − apa−1 ,
in particular P (p) = 2p − 1, P (p2 ) = 3p2 − 2p, etc.
3

(14)

(P (n))n≥1 is sequence A018804 in Sloane’s Encyclopedia. It is noted there that P (n) is
the number of times the number 1 appears in the character table of the cyclic group Cn .
Also, P (n) is the number of incongruent solutions of the congruence xy ≡ 0 (mod n).
The bounds 2n − 1 ≤ P (n) ≤ nτ (n) (n ≥ 1) follow at once by the definition (1) and (14),
respectively. The Dirichlet series of P is given by

X
P (n)

ns

n=1

=

ζ 2 (s − 1)
ζ(s)

(Re s > 2).

(15)

The convolution method applied for (2) leads to the asymptotic formulae
X

P (n) =

n≤x

X P (n)
n≤x

n

1
x2 log x + O(x2 ),
2ζ(2)

(16)

1
x log x + O(x).
ζ(2)

(17)

=

It follows that the average order of A(n) = P (n)/n is log n/ζ(2), that is, for 1 ≤ k ≤ n
the average value of (k, n) is log n/ζ(2), where 1/ζ(2) = 6/π 2 ≈ 0.607927.
Figure 1 is a plot of the function A(n) for 1 ≤ n ≤ 10 000, produced using Maple.

Figure_1
40

30

y 20

10

0

2000

4000

6000

x

8000

10000

Observe that writing φ = E ∗ µ, by (2) we have P = E ∗ E ∗ µ = Eτ ∗ µ, that is
X
P (n) =
dτ (d)µ(n/d).
d|n

4

(18)

This follows also from (15). Note that P is a rational arithmetical function of order
(2, 1), in the sense that P is the convolution of two completely multiplicative functions
and of another one which is the inverse (under convolution) of a completely multiplicative
function, cf. Haukkanen [19].
Using the representation (18) the following more precise asymptotic formula can be derived: for every ε > 0,


X
1 ζ ′ (2)
x2
log x + 2γ − −
+ O(x1+θ+ε ),
(19)
P (n) =
2ζ(2)
2
ζ(2)
n≤x
where γ is Euler’s constant and θ is the number appearing in Dirichlet’s divisor problem,
that is
X
τ (n) = x log x + (2γ − 1)x + O(xθ+ε ).
(20)
n≤x

It is known that 1/4 ≤ θ ≤ 131/416 ≈ 0.3149, where the upper bound, the best up to
date, is the result of Huxley [21]. To be more precise, the result of Huxley [21] says that the
error term in (20) is
O(x131/416 (log x)26947/8320 )
(21)
with 26947/8320 ≈ 3.2388.
The study of the gcd-sum function P and of its generalization Pf given by (29) goes back
to the work of Ces`aro in the years 1880’. The formula
n
X

f (gcd(k, n)) =

k=1

X

f (d)φ(n/d),

(22)

d|n

valid for an arbitrary arithmetical function f , is sometimes referred to as Ces`aro’s formula,
cf. Dickson [15, p. 127, 293], S´andor and Crstici [36, p. 182], Haukkanen [20].
The function P was rediscovered by Pillai [35] in 1933, showing formula (2) and that
X
X
P (d) = nτ (n) =
σ(d)φ(n/d),
(23)
d|n

d|n

σ(n) denoting, as usual, the sum of divisors of n.
Properties of P , including (2), (15) (16), (17) were discussed by Broughan [8] without
referring to the work of Ces`aro and Pillai.
Formulae (18) and (19) were obtained, even for a more general function, by Chidambaraswamy and Sitaramachandrarao [10]. They also proved the following result concerning the
maximal order of P (n):
lim sup
n→∞

log(P (n)/n) log log n
= log 2,
log n

(24)

which is well known for the function τ (n) instead of P (n)/n. (18) and (19) were obtained
later also by Bordell`es [5].
5

In a recent paper Bordell`es [7, Th. 8, eq. (xi)] pointed out that, according to (21), the
error term of (19) is O(x547/416 (log x)26947/8320 ).
The asymptotic formula (19) was obtained earlier by Kopetzky [25] with a weaker error
term. The same formula (19) was derived also by Broughan [8, Th. 4.7] with the weaker
error term O(x3/2 log x), but the coefficient of x2 is not correct (ζ 2 (2)/2ζ(3) is given).
One has
X
1 2
x log x + cx2 + O(x1+θ+ε ),
(25)
gcd(m, n) =
ζ(2)
m,n≤x

with a suitable constant c, which follows
from (19)Pusing the connection formula
between the
P
P
two types of summation, namely n≤x P (n) = m≤n≤x gcd(m, n) and m,n≤x gcd(m, n),
cf. Section 3. Formula (25) was given by Diaconis and Erd˝os [14] with the weaker error term
O(x3/2 log x).
P
The study of asymptotic formulae with error terms of n≤x P (n)/ns for real values of s
was initiated by Broughan [8, 9] and continued
P by Tanigawa and Zhai
P [45].
Alladi [1] gave asymptotic formulae for nk=1 (gcd(k, n))s and nk=1 (lcm[k, n])s (s ≥ 1).
Sum functions of the gcd’s and lcm’s were also considered by Gould and Shonhiwa [18, 41]
and Bordell`es [6].
The function P appears in the number theory books of Andrews [2, p. 91, Problem
10], Niven and Zuckerman [32, Section 4.4, Problem 6] (the author of this survey met the
function P for the first time in the Hungarian translation of this book) and McCarthy [29,
p. 29, Problem 1.3].
(P is multiplicative and (14)), Teuffel [44]
See also the proposed problems of Shallit [39]P
n
s
(formulae (2), (16) and asymptotic
formulae
for
P
P k=1 (gcd(k, n)) with s ≥ 2) and Lau [26]
(asymptotic formulae for 1≤i,j≤n gcd(i, j) and 1≤i,j≤n lcm[i, j]).
In a recent paper de Koninck and K´atai [24] investigated two general classes of functions,
one of them including A(n) = P (n)/n, and showed that
X
A(p − 1) = Lx + O(x(log log x)−1 ),
(26)
p≤x

where the sum is over the primes p ≤ x and L is a constant given by
−1

X


1
p
F (n)τ (n) Y
1Y
,
1+
1+
L=
2 p
p(p − 1) n=1
n
(p − 1)2

(27)

p|n

where F is the multiplicative function defined by F (pa ) = − a/(a+1)
for any prime power pa
p
(a ≥ 1).

3

Generalizations, connections to other functions

The gcd-sum function P can be generalized in various directions. For example:
i) One can investigate the function
Ps (n) =

n
X

(gcd(k, n))s ,

k=1

6

(28)

where s is a real number. More generally, for an arbitrary arithmetical function f let
Pf (n) =

n
X

f (gcd(k, n)),

(29)

k=1

mentioned already in Section 2.
ii) A multidimensional version is the function
X
P(k) (n) =
gcd(i1 , . . . , ik , n).

(30)

1≤i1 ,...,ik ≤n

iii) If g is a nonconstant polynomial with integer coefficients let
P

(g)

(n) =

n
X

gcd(g(k), n).

(31)

k=1

iv) If A is a regular convolution and (k, n)A is the greatest divisor d of k such that
d ∈ A(n) (see for ex. McCarthy [29, Ch. 4]) let
PA (n) =

n
X

(k, n)A .

(32)

k=1

These generalizations can also be combined. The general function investigated by T´oth
[50] includes all of i)-iv) given above (it is even more general). T´oth [48] considered a generalization defined for arithmetical progressions. We do not deal here with these generalizations,
see [4, 10, 20, 25, 40, 56], but point out the following properties concerning functions of type
Pf given by (29).
For an arbitrary arithmetical function f ,
Sf (x) =

X

f (gcd(m, n)) = 2

m,n≤x

n
XX
n≤x k=1

=2

X
n≤x

Pf (n) −

X

f (gcd(k, n)) −

X

f (n)

(33)

n≤x

f (n),

n≤x

cf. Cohen
3.1]. In that paper asymptotic formulae for Sf (x) are deduced if
P [11, Lemma
t
f (n) = de=n g(d)e , where t ≥ 1 and g is a bounded arithmetical function. For example,
Cohen [11, Cor. 3.2] derived that


X
x2
1 ζ(2) 2ζ ′ (2)

φ(gcd(m, n)) = 2
log x + 2γ − −
+ R(x),
(34)
ζ (2)
2
2
ζ(2)
m,n≤x
where R(x) = O(x3/2 log x) and a similar result with the same error term for the function
σ(n). Cohen [12] improved these error terms into R(x) = O(x3/2 ) by an elementary method.
For f = g ∗ E one has Pf = (gP
∗ µ) ∗ Eτ , and simple convolution arguments show that
for g bounded the error term for n≤x Pf (n) is the same as in (19) and in (34), namely
O(x1+θ+ε ). This was obtained also by Cohen [13], in a slightly different form.
7

Similar asymptotic formulae can be given for other choices of f . For example, let f = µ2 .
(p) = p, Pµ2 (pa ) = pa − pa−2 for any prime p and any a ≥ 2. Furthermore,
Then Pµ2 P
Pµ2 (n) = d2 e=n µ(d)e and obtain
X

Pµ2 (n) =

n≤x

x2
+ O(x).
2ζ(4)

(35)

P
Bordell`es [7, Th. 4] provides some general asymptotic results for
n≤x Pf (n) with f
belonging to certain classes of arithmetic functions. As special cases and among others, the
following estimates are proven ([7, Th. 8, eq. (i),(ii),(iii),(v)]):
X

x2
+ O(x),
2ζ(2k)

(36)

ζ(2) 2
x + O(x(log x)2/3 ),
2ζ(2k)

(37)

Pµk (n) =

n≤x

X

Pτ(k) (n) =

n≤x

X
n≤x

Pβ (n) =

ζ(4)ζ(6) 2
x + O(x),
2ζ(12)


x2 Y
ζ(2j) + O(x),
Pa (n) =
2 j=2
n≤x

X

(38)

(39)

where µk is the characteristic function of the k-free integers, τ(k) (n) is the number of k-free
divisors of n (k ≥ 2), β(n) is the number of squarefull divisors of n and a(n) represents the
number of non-isomorphic abelian groups of order n. For k = 2, (36) gives (35).
Note that certain error terms given by Bordell`es [7, Th. 8] can be improved. For example,
4/3
the error term of (37) is given
P in [7] with an extra factor (log log x) . Here (37) yields
by observing that Pτ(k) (n) = dk e=n µ(d)σ(e) and using the following estimate of Walfisz:
P
ζ(2) 2
x)2/3 ).
n≤x σ(n) =P2 x + O(x(logP
n
We have k=1 agcd(k,n) = d|n ad φ(n/d) ≡ 0 (mod n) for any integers a, n ≥ 1. This
known congruence property has number theoretical and combinatorial proofs and interpretations, cf. Dickson [15, p. 78, 86].
The related formula
n
X

k=1
gcd(k,n)=1

gcd(k − 1, n) = τ (n)φ(n) (n ≥ 1)

(40)

is due to Kesava Menon [23]. See also McCarthy [29, Ch. 1].
The products
h(n) =

n
Y

gcd(k, n),

hf (n) =

k=1

n
Y

k=1

8

f (gcd(k, n))

(41)

were considered by Loveless [27] (A067911).
Note that the geometric mean of gcd(1, n), . . .,
Q
1/n
φ(d)
gcd(n, n) is G(n) = (h(n)) = n/ d|n d , which is a multiplicative function of n, cf. [27,
Th. 6].
P
Using that log h(n) = d|n φ(n/d) log d we deduce
X
n≤x

log h(n) = −

ζ ′ (2) 2
x + O(x(log x)8/3 (log log x)4/3 )
2ζ(2)

by applying the estimate of Walfisz for φ, namely
X
1
φ(n) =
x2 + O(x(log x)2/3 (log log x)4/3 ),
2ζ(2)
n≤x

(42)

(43)

providing the best error up to date. (42) is given by Loveless [27, Th. 11, Corrig.] with a
weaker error term, namely with O(x log3 x).
Some authors, including Diaconis and Erd˝os [14], Bege [4], Broughan [8] use or refer to
a result of Saltykov – the error term in (43) is O(x(log x)2/3 (log log x)1+ε ) – which is not
correct(!) as it was shown by P´etermann [33].
Note that Bordell`es [6] obtained asymptotic formulae for another type of generalization,
namely given by gk = µ ∗ Eτk , where τk is the generalized (Dirichlet-Piltz) divisor function.
It
natural to define such functions P (k) in this way: P (1) (n) = P (n), P (k+1) (n) =
Pnis more
(k)
(gcd(j, n)) (k ≥ 1). Then P (k) = µ ∗ · · · ∗ µ ∗Eτk and asymptotic formulae for P (k)
j=1 P
| {z }
k

can be given.
Let n1 , . . . , nr be positive integers, where r ≥ 1 and m = lcm[n1 , . . . , nr ]. The multivariate function
m
1 X
P (n1 , . . . , nr ) =
gcd(k, n1 ) · · · gcd(k, nr )
(44)
m k=1

was
P considered by Minami [30]. For r = 1 this reduces to P . One has, inserting gcd(k, ni ) =
di |gcd(k,ni ) φ(di ),
X
φ(d1 ) · · · φ(dr )
P (n1 , . . . , nr ) =
,
(45)
lcm[d1 , . . . , dr ]
d1 |n1 ,...,dr |nr

formula not given in [30].
Schramm [38] investigated the discrete Fourier transform of functions of the form f (gcd(n, r)),
where f is an arbitrary arithmetic function. He considered also various special functions f
and deduced interesting identities, for example,
r
X
φ(r) =
gcd(k, r) exp(−2πik/r),
(46)
k=1

gcd(n, r) =

r
X

exp(2πikn/r)

k=1

X

cd (k)/d,

(47)

d|r

valid for n, r ≥ 1, where cd (k) denotes the Ramanujan sum.
The function α (cf. A057660) defined in the Introduction was considered also by S´andor
and Kramer [37].
9

4

Proofs of Theorems 1 and 4

Proof of Theorem 1. i) First we show that
X
A2 (n) =
τ 2 (d)g(e),

(48)

de=n

where g is multiplicative and g(p) = −4/p + 1/p2 , g(pa ) = 4(−1)a /p for any prime p and
a ≥ 2.
By the multiplicativity of the involved functions it is enough to verify (48) for prime
powers pa (a ≥ 1). We have
X

2

τ (d)g(e) =

de=pa

a−1
X

τ 2 (pj−1 )g(pa−j+1 ) + τ 2 (pa−1 )g(p) + τ 2 (pa )

j=1

=

a−1
X

4
j 2 (−1)a−j+1 + a2 (−4/p + 1/p2 ) + (a + 1)2
p
j=1

a−1
X
a2 4a2
= (−1)
+ (a + 1)2 = (a + 1 − a/p)2 = A2 (pa ),
(−1)j−1 j 2 + 2 −
p j=1
p
p
a4

which follows by the elementary formula

n
X
n(n + 1)
(−1)j−1 j 2 = (−1)n−1
2
j=1

(n ≥ 1).

Here the Dirichlet series of g is given by
G(s) =


X
g(n)
n=1

ns

=

Y

1+

p

1
ps+2

4

s
p(p + 1)



,

which is absolutely convergent for s ∈ C with Re s > 0. Therefore, for any ε > 0,
X
n≤x

g(n) = O(xε ),

X g(n)
n>x

n

= O(x−1+ε ).

We need the next formula of Ramanujan, cf. Wilson [57],
X
τ 2 (n) = x(a log3 x + b log2 x + c log x + d) + O(x1/2+ε ),
n≤x

where a = 1/π 2 , b, c, d are constants.
By (48) and (49) we obtain
X
X
X
A2 (n) =
g(d)
τ 2 (e)
n≤x

d≤x

10

e≤x/d

(49)

= ax

X g(d)
d

d≤x

log3 (x/d) + bx

X g(d)
d

d≤x

log2 (x/d) + cx

X g(d)
d≤x

!

X |g(d)|
+O x1/2+ε
d1/2+ε
d≤x

d

log(x/d) + dx

X g(d)
d≤x

d

.

Now formula (6) follows by usual estimates with the constants
C1 = aG(1),

C2 = 3aG′ (1) + bG(1),

C3 = 3aG′′ (1) + 2bG′ (1) + cG(1),

(50)

C4 = aG′′′ (1) + bG′′ (1) + cG′ (1) + dG(1),
where G′ , G′′ , G′′′ are the derivatives of G.
P
ii) Assume that α4 < 1/2. We use that in this case the error term for n≤x τ 2 (n) in
Rao [43]. We
(49) is O(x1/2 δ(x)), as it was proved by Suryanarayana and Sitaramachandra
P
ε
2
obtain, applying that x δ(x) is increasing, that the error term for n≤x A (n) is


X
d≤x

|g(d)|(x/d)1/2 δ(x/d) =
≪ x1/2−ε (xε δ(x))

X
d≤x

|g(d)|(x/d)1/2−ε (x/d)ε δ(x/d)

X |g(d)|
≪ x1/2 δ(x).
1/2−ε
d
d≤x

(2−α4 )/(5−4α4 )
iii) Assume RH. Then we apply that
η(x)),
P the error term1/2of (49) is O(x
µ(n)

x
η(x)
according
to
the
result
of
cf. [43, Lemma 2.4, Th. 3.2], where
n≤x
Soundararajan [42] quoted in the Introduction. Using that η(x) is increasing, we obtain the
given error term.
Proof of Theorem 4. The function H is multiplicative and for any prime power pa
(a ≥ 1),
p2a (p + 1)
H(pa ) = 2a+1
.
(51)
p
+1

Now write

X h(d)
H(n)
=
n
φ(e)
de=n
(d,e)=1

as the unitary convolution of the functions h and 1/φ, where h is multiplicative and for every
prime power pa (a ≥ 1),
H(pa )
1
= h(pa ) +
,
a
p
φ(pa )
where

with f (n) =

Q

|h(pa )| <
p|n (p(p

− 1))−1 .

pa (p

h(pa ) = −

1
,
− 1)2

p2a−1 + 1
,
pa−1 (p − 1)(p2a+1 + 1)

|h(n)| ≤

11

f (n)
(n ≥ 1),
φ(n)

We need the following known result, cf. for example Montgomery and Vaughan [31, p.
43],


X 1
ω(k) log x
,
= Ka(k) (log x + γ + b(k)) + O 2
φ(n)
x
n≤x
(n,k)=1

where γ is Euler’s constant, ω(k) stands for the number of distinct prime divisors of k,

Y
ζ(2)ζ(3)
p
φ(k)
K=
1− 2

, a(k) =
,
ζ(6)
p −p+1
k
p|k


Y
X log p X log p
1
ψ(k) log k
1+
.


, with ψ(k) = k
b(k) =
p−1
p2 − p + 1
φ(k)
p
p∤k

p|k

We obtain

p|k

X H(n)
n

n≤x

=K

(log x + γ)

X

h(d)a(d) +

d≤x

X
d≤x

=

X

h(d)

d≤x

X

1
=
φ(e)

e≤x/d
gcd(e,d)=1

h(d)a(d)(b(d) − log d)

!

+O

and we obtain the given result with the constants
C5 = K


X

h(n)a(n), C6 = Kγ

n=1


X

h(n)a(n) + K

n=1


X
n=1

log x X
x

!

d|h(d)|2ω(d) ,

d≤x

h(n)a(n)(b(n) − log n),

these series being convergent taking into account the estimates of above. For the error terms,

X f (n) n
X
f (n)
1−ε
−1+ε
<
( )
x
n=1
n>x
n>x

Y
1
−1+ε
≪ x−1+ε ,
=x
1+
ε
p(p − 1)(p − 1)
p

X

X f (n)

in a similar way,

X
n>x

and
X
n≤x

ω(n)

n|h(n)|2

a(n)|h(n)(b(n) − log n)| ≪ x−1+ε ,


XY
X
2ω(n) Y
2 ω(n) x ε
ε

( 1/(p − 1) )2 ( ) < x
( 1/(p − 1)2 )
ε
n
n
n=1
n≤x
p|n

Y
ε
=x
1+
p

p|n

2
(p − 1)2 (pε − 1)



≪ xε ,

ending the proof, which is similar to that of T´oth [52, Th. 6].
Proof of Corollary 5. Follows from Theorem 4 by partial summation.
12

5

Analogs of the gcd-sum function

5.1

Unitary analog

Recall, that a positive integer d is said to be a unitary divisor of n if d | n and gcd(d, n/d) = 1,
notation d || n. The unitary analogue of the function P is the function


P (n) =

n
X

(k, n)∗ ,

(52)

k=1

where (k, n)∗ := max{d ∈ N : d | k, d || n}, which was introduced by T´oth [47]. The function
P ∗ (A145388) is also multiplicative and P ∗ (pa ) = 2pa − 1 for every prime power pa (a ≥ 1).
It has also other properties, including asymptotic ones, which are close to the usual gcd-sum
function.
Consider the function φ∗ (the unitary Euler function, A047994) defined by
φ∗ (n) = #{k ∈ N : 1 ≤ k ≤ n, (k, n)∗ = 1},
which is multiplicative and φ∗ (pa ) = pa − 1 for every prime power pa (a ≥ 1). Then
X
P ∗ (n) =
dφ∗ (n/d).

(53)

(54)

d||n

It was proved by T´oth [49] that
X
α 2
P ∗ (n) =
x log x + βx2 + O(x3/2 log x),
2ζ(2)
n≤x

(55)

Q
where α = p (1 − 1/(p + 1)2 ) ≈ 0.775883, cf. [16, p. 110] and β are constants.
Note that we also have
lim sup
n→∞

log(P ∗ (n)/n) log log n
= log 2,
log n

(56)

the same result as for P (n). This is not given in the literature. For the proof, which is similar
to that of [53, Th. 1], take into account (24),Qwhere the limsup is attained for a sequence of
square-free integers (more exactly for nk = k/ log2 k 1 be an integer
Q of canonical
form n = ri=1 pai i . The integer d is called an exponential divisor of n if d = ri=1 pci i , where
ci | ai for every 1 ≤ i ≤ r, notation: d |e n. By convention 1 |e 1. Note that 1 is not
an exponentialQdivisor of n > 1, the smallest exponential divisor of n > 1 is its square-free
kernel κ(n) = ri=1 pi .
Two integers n, m > 1 have common
iff they have the same prime
Q
Q exponential divisors
factors and in this case, i.e., for n = ri=1 pai i , m = ri=1 pbi i , ai , bi ≥ 1 (1 ≤ i ≤ r), the
greatest common exponential divisor of n and m is
(n, m)(e) =

r
Y

(ai ,bi )

pi

.

(62)

i=1

Here (1, 1)(e) = 1 by convention and (1, m)(e) does not exist for m > 1.
Let P (e) (n) be given by
X
(k, n)(e) ,
P (e) (n) =

(63)

1≤k≤n
κ(k)=κ(n)

introduced by T´oth [51]. The function P (e) is multiplicative and for every prime power pa ,
X
X
P (e) (pa ) =
p(j,a) =
pd φ(a/d),
(64)
1≤j≤a

d|a

here P (e) (p) = p, P (e) (p2 ) = p + p2 , P (e) (p3 ) = 2p + p3 , P (e) (p4 ) = 2p + p2 + p4 , etc.
14

We have, see [51, Th. 3],
X
n≤x

P (e) (n) = Ex2 + O(x(log x)5/3 ),

(65)

where the constant E is given by


X P (e) (pa ) − pP (e) (pa−1 )
1Y
E=
1+
2 p
p2a
a=2

!

.

(66)

P´etermann [34, Th. 2] showed that for s ∈ C, Re s > 2,

X
P (e) (n)
n=1

ns

=

ζ(s − 1)ζ(2s − 1)
W (s),
ζ(3s − 2)

(67)

where W (s) is absolutely convergent for Re s > 3/4 and that the error term of (65) is
Ω± (x log log x).
Concerning the maximal order of the function P (e) we have by [51, Th. 4],
6
P (e) (n)
= 2 eγ ,
lim sup
π
n→∞ n log log n

(68)

where γ is Euler’s constant.

5.4

Analog involving regular integers (mod n)

Next we give another analog. Let n > 1 be an integer with prime factorization n = pν11 · · · pνrr .
An integer k is called regular (mod n) if there exists an integer x such that k 2 x ≡ k (mod
n). It can be shown that k ≥ 1 is regular (mod n) if and only if for every i ∈ {1, . . . , r}
either pi ∤ k or pνi i | k. Also, k ≥ 1 is regular (mod n) if and only if gcd(k, n) is a unitary
divisor of n. These and other characterizations of regular integers are given by T´oth [52].
Let Regn = {k : 1 ≤ k ≤ n and k is regular (mod n)}. T´oth [53] introduced the function
X
gcd(k, n)
(69)
Pe(n) =
k∈Regn

(A176345) and showed the following properties. For every n ≥ 1,
X
Pe(n) =
d φ(n/d),

(70)

d||n

hence Pe is a multiplicative function and

Pe(n) = n

Y
p|n

15

1
2−
p



.

(71)

Also, the minimal order of Pe(n) is 3n/2 and the maximal order of log(Pe(n)/n) is
log 2 log n/ log log n. We have
X
n≤x

Pe(n) =

x2
(K1 log x + K2 ) + O(x3/2 δ(x)),
2ζ(2)

(72)

where K1 and K2 are certain constants and δ(x) is given by (8).
If RH is true, then the error term of (72) is O(x(7−5θ)/(5−4θ) ω(x)), where
ω(x) = exp(c log x(log log x)−1 )

(73)

with a positive constant c and θ the exponent in the Dirichlet divisor problem (20). For
θ ≈ 0.3149 one has (7 − 5θ)/(5 − 4θ) ≈ 1.4505.
Zhang and Zhai [58] showed that for s ∈ C, Re s > 2,
∞ e
X
P (n)
n=1

where H(s) =

Q 
p 1−

1
p(ps−1 +1)



ns

=

ζ 2 (s − 1)
H(s),
ζ(2s − 2)

(74)

is absolutely convergent for Re s > 1, the error term of (72)

is connected to the square-free divisor problem and it is O(x15/11+ε ), where 15/11 ≈ 1.3636,
assuming RH.
e
De Koninck and K´atai [24] showed that for A(n)
= Pe(n)/n,
X
e − 1) = L′ x + O(x(log log x)−1 ),
A(p
(75)
p≤x

where L′ is a constant, result which is similar to (26).
e
Figure 2 is a plot of the function A(n)
for 1 ≤ n ≤ 10 000, produced using Maple.

16

Figure_2
40

30

y 20

10

0

5.5

2000

4000

x

6000

8000

10000

Analog concerning subsets of the set {1, 2, . . . , n}

For a nonempty subset A of {1, 2, . . . , n} let gcd(A) denote the gcd of the elements of A.
Consider the gcd-sum type functions PS and PS,k defined by
X
X
PS (n) =
gcd(gcd(A), n)), PS,k (n) =
gcd(gcd(A), n)),
(76)
A

#A=k

where the sums are over all nonempty subsets A of {1, 2, . . . , n} and over all subsets A of
{1, 2, . . . , n} having k elements (k ≥ 1 fixed), respectively. For k = 1 this reduces to the
function P .
These are special cases of more general gcd-sum type functions investigated by T´oth [55].
We have, cf. [55, eq. (34),(37),(38)],
X
PS (n) =
φ(d)2n/d − n (n ≥ 1),
(77)
d|n



n/d
(n ≥ 1),
φ(d)
k

(78)

ζ(k)
xk+1 + O(ψk (x)) (k ≥ 2),
(k + 1)!ζ(k + 1)

(79)

PS,k (n) =

X
d|n

X
n≤x

PS,k (n) =

where ψk (x) = xk for k ≥ 3 and ψ2 (x) = x2 log x.
17

6

Open problems

Here I list some open problems concerning the functions discussed
P above.
1. Determine the integers n ≥ 1 such that n | P (n), that is d|n φ(d)
is an integer.
d
The first few values are: 1, 4, 15, 16, 27, 48, 60, 64, 108, 144, 240, 256, 325, 432, 729,Q
891, 960.
This is sequence A066862 in Sloane’s Encyclopedia. From (14) it is clear that n = ri=1 pai i pi
are solutions for any distinct primes pi and any ai ≥ 1.

Qr
Qr 
1
For square-free values n = i=1 pi this is equivalent to i=1 2 − pi be an integer. It
can be shown that the only square-free solutions having at most three distinct prime factors
are n = 1 and n = 15.
I conjecture that there are no other square-free solutions. I have verified this for the
integers n < 106 .

Q 
2. Determine the integers n ≥ 1 such that n | Pe(n). This holds iff p|n 2 − p1 is an
integer. If the previous conjecture is true, then the only integers solutions to the present
problem are n = 1 and n = 15.
3. Investigate the equation Pe(n) = Pe(n + 1).
The first few solutions are: 45, 225, 1125, 2025, 3645, 140625, 164025, 257174. According
to de Koninck and K´atai [24] this equation has 37 solutions < 1010 and 21 of them are of
form n = 3a 5b .

4. What is the minimal order of P (n)
P (P (n))?k
5. Derive asymptotic formulae for n≤x (f (n)) , where f is one of the functions P , P ∗ ,
P (e) , Pe and k > 2.
6. Investigate asymptotic properties of the iterates f (f (n)), where f is one of the functions P , P ∗ , P (e) , Pe.

7

Added in proof

The author P
thanks the anonymous referee for helpful suggestions and for the following results
concerning n≤x 1/f (n), where f is any of the functions P , P ∗ , P (e) , Pe. The problem of
finding such asymptotic formulae was included originally in the previous section.
Theorem 6.

X

1
= K(log x)1/2 + O((log x)−1/2 ),
P (n)
n≤x

X
n≤x

1

P ∗ (n)

X

1

e
n≤x P (n)
X
n≤x

(80)

= K ∗ (log x)1/2 + O((log x)−1/2 ),

(81)

e
= K(log
x)1/2 + O((log x)−1/2 ),

(82)

1

P (e) (n)

= K (e) log x + O(1),

18

(83)

where


1/2
2 Y
1
K=√
1−
p
π p

1/2

2 Y
1

K =√
1−
p
π p

1+

1
P (pa )


X

1
2pa − 1

a=1

1+

!


X

a=1

,

!

(84)

,

(85)

1/2 


1
1
1
2 Y
e
1+
≈ 1.46851,

1−
K=√
p
p − 1 2p − 1
π p
!


Y
X
1
1
K (e) =
1−
.
1+
(e) (pa )
p
P
p
a=1

(86)

(87)

For the proof we apply the following useful theorem, which is a particular case of a more
general result, proved by Martin [28].
Theorem [28, Proposition A. 3]. Let f be any nonnegative multiplicative function such
that f (n) ≪ nα for some α < 1/2 and satisfying
X f (p) log p
p

p≤x

= κ log x + Of (1)

(x ≥ 2),

where κ = κf > 0. Then we have uniformly for all x ≥ 2,
X f (n)
n≤x

where
Mf,κ

n

= Mf,κ (log x)κ + Of ((log x)κ−1 ),


Y
1
1
=
1−
Γ(κ + 1) p
p

1+


X
f (pa )
a=1

pa

(88)
!

Let f (n) = n/P (n), which is multiplicative and by (14), f (pa ) =

.
p
for any
(a + 1)p − a

2
2ω(n)
and f (n) ≤
≤ 1 for any n ≥ 1. Since
a+1
τ (n)

X f (p) log p X log p  1
1
1
=
+
= log x + O(1),
p
p
2 4p − 2
2
p≤x
p≤x

prime power pa (a ≥ 1). Hence f (pa ) ≤

the cited theorem gives the formula (80), by choosing κ = 1/2, where Γ(3/2) =
By similar arguments we obtain formulae (81), (82) and (83).

19



π/2.

References
[1] K. Alladi, On generalized Euler functions and related totients, in New Concepts in
Arithmetic Functions, Matscience Report 83, Madras, 1975.
[2] G. E. Andrews, Number Theory, W. B. Saunders, 1971.
[3] M. Balazard and A. De Roton, Notes de lecture de l’article “Partial sums of the
M¨obius function” de Kannan Soundararajan (French), Preprint, 2008. Available at
http://front.math.ucdavis.edu/0810.3587.
[4] A. Bege, Old and New Arithmetic Functions (Hungarian), Scientia, Kolozsv´ar [ClujNapoca], 2006.
[5] O. Bordell`es, A note on the average order of the gcd-sum function, J. Integer Sequences
10 (2007), Article 07.3.3.
[6] O. Bordell`es, Mean values of generalized gcd-sum and lcm-sum functions, J. Integer
Sequences 10 (2007), Article 07.9.2.
[7] O. Bordell`es, The composition of the gcd and certain arithmetic functions, J. Integer
Sequences 13 (2010), Article 10.7.1.
[8] K. A. Broughan, The gcd-sum function, J. Integer Sequences 4 (2001), Article 01.2.2.
[9] K. A. Broughan, The average order of the Dirichlet series of the gcd-sum function, J.
Integer Sequences 10 (2007), Article 07.4.2.
[10] J. Chidambaraswamy and R. Sitaramachandrarao, Asymptotic results for a class of
arithmetical functions, Monatsh. Math. 99 (1985), 19–27.
[11] E. Cohen, Arithmetical functions of a greatest common divisor, I., Proc. Amer. Math.
Soc. 11 (1960), 164–171.
[12] E. Cohen, Arithmetical functions of a greatest common divisor, II. An alternative approach, Boll. Un. Mat. Ital. 17 (1962), 349–356.
[13] E. Cohen, Arithmetical functions of a greatest common divisor, III. Ces`aro’s divisor
problem, Proc. Glasgow Math. Assoc. 5 (1961-1962), 67–75.
[14] P. Diaconis and P. Erd˝os, On the distribution of the greatest common divisor, in A
festschrift for Herman Rubin, IMS Lecture Notes Monogr. Ser., Inst. Math. Statist.,
45, (2004), 56-61 (original version: Technical Report No. 12, Department of Statistics,
Stanford University, Stanford, 1977).
[15] L. E. Dickson, History of the Theory of Numbers, vol. 1, Chelsea, New York, 1952.
[16] S. R. Finch, Mathematical Constants, Cambridge University Press, 2003.

20

[17] J. von zur Gathen, A. Knopfmacher, F. Luca, L. G. Lucht, and I. E. Shparlinski, Average
order in cyclic groups, J. Th´eor. Nombres Bordeaux 16 (2004), 107–123. Available at
http://www.numdam.org/item?id=JTNB 2004 16 1 107 0.
[18] H. W. Gould and T. Shonhiwa, Functions of GCD’s and LCM’s, Indian J. Math. 39
(1997), 11–35.
[19] P. Haukkanen, Rational arithmetical functions of order (2, 1) with respect to regular
convolutions, Portugal. Math. 56 (1999), 329–343.
[20] P. Haukkanen, On a gcd-sum function, Aequationes Math. 76 (2008), 168–178.
[21] M. N. Huxley, Exponential sums and lattice points III., Proc. London Math. Soc. 87
(2003), 591–609.
[22] A. Ivi`c, E. Kr¨atzel, M. K¨
uhleitner, and W. G. Nowak, Lattice points in large regions and
related arithmetic functions: recent developments in a very classic topic, Elementare und
analytische Zahlentheorie, Schr. Wiss. Ges. Johann Wolfgang Goethe Univ. Frankfurt
am Main, 20, 89–128, Franz Steiner Verlag Stuttgart, 2006.
P
[23] P. Kesava Menon, On the sum (a − 1, n)[(a, n) = 1], J. Indian Math. Soc. 29 (1965),
155–163.
[24] J.-M. de Koninck and I. K´atai, Some remarks on a paper of L. Toth, J. Integer Sequences
13 (2010), Article 10.1.2.
[25] H. G. Kopetzky, Ein asymptotischer Ausdruck f¨
ur eine zahlentheoretische Funktion,
Monatsh. Math. 84 (1977), 213–217.
[26] Kee-Wai Lau, Problem 6615, Amer. Math. Monthly 96 (1989), 847, solution in 98
(1991), 562–565.
[27] A. D. Loveless, General gcd-product function, Integers 6 (2006), Paper A19, 13 pp,
corrigendum Paper A39.
[28] G. Martin, An asymptotic formula for the number of smooth values of a polynomial, J.
Number Theory 93 (2002), 108–182.
[29] P. J. McCarthy, Introduction to Arithmetical Functions, Universitext, Springer, 1986.
[30] N. Minami, On the random variable N ∋ l 7→ gcd(l, n1 ) gcd(l, n2 ) · · · gcd(l, nk ) ∈ N,
Preprint, 2009. Available at http://arxiv.org/abs/0907.0918.
[31] H. L. Montgomery and R. C. Vaughan, Multiplicative Number Theory I. Classical Theory, Cambridge University Press, 2007.
[32] I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers, 3th edition,
John Wiley & Sons, 1972.

21

[33] Y.-F. S. P´etermann, On an estimate of Walfisz and Saltykov for an error term related
to the Euler function, J. Th´eor. Nombres Bordeaux 10 (1998), 203–236.
[34] Y.-F. S. P´etermann, Arithmetical functions involving exponential divisors: Note on two
papers by L. T´oth, Annales Univ. Sci. Budapest., Sect. Comp., to appear.
[35] S. S. Pillai, On an arithmetic function, J. Annamalai Univ. 2 (1933), 243–248.
[36] J. S´andor and B. Crstici, Handbook of Number Theory II., Kluwer Academic Publishers,
2004.
¨
[37] J. S´andor and A.-V. Kramer, Uber
eine zahlentheoretische Funktion, Math. Morav. 3
(1999), 53–62.
[38] W. Schramm, The Fourier transform of functions of the greatest common divisor, Integers 8 (2008), #A50.
[39] J. Shallit, Problem E 2821, Amer. Math. Monthly 87 (1980), 220. Solution in 88 (1981),
444–445.
[40] R. Sivaramakrishnan, On three extensions of Pillai’s arithmetic function β(n), Math.
Student 39 (1971), 187–190.
[41] T. Shonhiwa and H. W. Gould, A generalization of Ces`aro’s function and other results,
Indian J. Math. 39 (1997), 183–194.
[42] K. Soundararajan, Partial sums of the M¨obius function, J. Reine Angew. Math. 631
(2009), 141–152.
[43] D. Suryanarayana and R. Sitaramachandra Rao, On an asymptotic formula of Ramanujan, Math. Scand. 32 (1973), 258–264.
[44] E. Teuffel, Aufgabe 599, Elem. Math. 25 (1970), 65–66.
[45] Y. Tanigawa and W. Zhai, On the gcd-sum function, J. Integer Sequences 11 (2008),
Article 08.2.3.
[46] E. C. Titchmarsh, The Theory of the Riemann Zeta Function, Second edition, Edited
and with a preface by D. R. Heath-Brown, Clarendon Press, Oxford University Press,
New York, 1986.
[47] L. T´oth, The unitary analogue of Pillai’s arithmetical function, Collect. Math. 40 (1989),
19–30.
[48] L. T´oth, Some remarks on a generalization of Euler’s function, Semin. Arghiriade 23
(1990).
[49] L. T´oth, The unitary analogue of Pillai’s arithmetical function II., Notes
Number Theory Discrete Math. 2 (1996), no. 2, 40–46. Available at
http://www.ttk.pte.hu/matek/ltoth/Toth Pillai2 1996.pdf.
22

[50] L. T´oth, A generalization of Pillai’s arithmetical function involving regular convolutions,
Proceedings of the 13th Czech and Slovak International Conference on Number Theory
(Ostravice, 1997), Acta Math. Inform. Univ. Ostraviensis 6 (1998), 203–217. Available
at http://dml.cz/dmlcz/120534.
[51] L. T´oth, On certain arithmetic functions involving exponential divisors, Annales Univ. Sci. Budapest., Sect. Comp. 24 (2004), 285–294. Available at
http://front.math.ucdavis.edu/0610.5274.
[52] L. T´oth, Regular integers (mod n), Annales Univ. Sci. Budapest., Sect. Comp. 29
(2008), 263–275. Available at http://front.math.ucdavis.edu/0710.1936.
[53] L. T´oth, A gcd-sum function over regular integers (mod n), J. Integer Sequences 12
(2009), Article 09.2.5.
[54] L. T´oth, On the bi-unitary analogues of Euler’s arithmetical function and the gcd-sum
function, J. Integer Sequences 12 (2009), Article 09.5.2.
[55] L. T´oth, On the number of certain relatively prime subsets of {1, 2, . . . , n}, Integers, to
appear.
[56] A. C. Vasu, On a certain arithmetic function, Math. Student 34 (1966), 93–95.
[57] B. M. Wilson, Proofs of some formulae enunciated by Ramanujan, Proc. London Math.
Soc. (2) 21 (1922), 235–255.
[58] D. Zhang and W. Zhai, Mean values of a gcd-sum function over regular integers modulo
n, J. Integer Sequences 13 (2010), Article 10.4.7.

2000 Mathematics Subject Classification: Primary 11A25; Secondary 11N37.
Keywords: gcd-sum function, Euler’s arithmetical function, divisor function, unitary divisor,
exponential divisor, regular integer (mod n), average order.
(Concerned with sequence A001880, A018804, A047994, A057660, A066862, A067911, A145388,
and A176345.)

Received April 29 2010; revised version received July 20 2010. Published in Journal of
Integer Sequences, August 2 2010.
Return to Journal of Integer Sequences home page.

23