\documentclass[12pt,reqno]{article}

\usepackage[usenames]{color}
\usepackage{amssymb}
\usepackage{graphicx}
\usepackage{amscd}

\usepackage[colorlinks=true,
linkcolor=webgreen,
filecolor=webbrown,
citecolor=webgreen]{hyperref}

\definecolor{webgreen}{rgb}{0,.5,0}
\definecolor{webbrown}{rgb}{.6,0,0}

\usepackage{color}
\usepackage{fullpage}
\usepackage{float}

\usepackage{psfig}
\usepackage{graphics,amsmath,amssymb}
\usepackage{amsthm}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{epsf}

\setlength{\textwidth}{6.5in}
\setlength{\oddsidemargin}{.1in}
\setlength{\evensidemargin}{.1in}
\setlength{\topmargin}{-.5in}
\setlength{\textheight}{8.9in}

\newcommand{\seqnum}[1]{\href{http://oeis.org/#1}{\underline{#1}}}


\begin{document}

\begin{center}
\epsfxsize=4in
\leavevmode\epsffile{logo129.eps}
\end{center}

\begin{center}
\vskip 1cm{\LARGE\bf 
Mean Values of Generalized gcd-sum \\
\vskip .12in 
and lcm-sum Functions
}
\vskip 1cm
\large
Olivier Bordell\`es \\
2, All\' ee de la Combe\\
La Boriette\\
43000 Aiguilhe\\
France\\
\href{mailto:borde43@wanadoo.fr}{\tt borde43@wanadoo.fr}\\
\end{center}

\vskip .2 in

\begin{abstract}
We consider a generalization of the gcd-sum function,
and obtain its average order with a quasi-optimal error term.
We also study the reciprocals of the gcd-sum and lcm-sum functions.
\end{abstract}

\newtheorem{theorem}{Theorem}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{conjecture}[theorem]{Conjecture}




\newtheorem{def1}{Definition}[section]
\newtheorem{def2}[def1]{Definition}
\newtheorem{def3}{Definition}[section]
\newtheorem{theo1}[def1]{Theorem}
\newtheorem{theo2}{Theorem}[section]
\newtheorem{theo3}[def3]{Theorem}
\newtheorem{theo4}{Theorem}[section]
\newtheorem{lem1}{Lemma}[section]
\newtheorem{lem2}{Lemma}[section]
\newtheorem{lem3}[def3]{Lemma}
\newtheorem{lem4}[theo4]{Lemma}



\section{Introduction and notation}

The so-called gcd-sum function, defined by $$g\left( n\right)
=\sum_{j=1}^n\left( n,j\right)$$ where $\left( a,b\right) $ denotes the
greatest common divisor of $a$ and $b,$ was first introduced by
Broughan (\cite{brou,brou2}) who studied its main properties,
and showed among other things that $g$ satisfies the convolution
identity (see also the beginning of the proof of Lemma~\ref{lm1})
$$g=\varphi \ast \text{Id}$$ where $F \ast G$ is the usual Dirichlet
convolution product.  By using the following alternative convolution
identity $$g=\mu  \ast \left( \text{Id}\cdot \tau \right) ,$$ where
$\mu $ is the M\"obius function and $\tau $ is the divisor function, we
were able in \cite{bor1} to get the average order of $g.$ Our result
can be stated as follow. If $\theta $ is the exponent in the Dirichlet
divisor problem, then the following asymptotic formula

\begin{equation}
   \begin{split}
     \sum_{n\leqslant x}g\left( n\right) =\dfrac{x^2\log x}{2\zeta \left( 2\right) }+\dfrac{x^2}{2\zeta \left( 2\right) }\left( \gamma -\dfrac 12+\log \left( \dfrac{\mathcal{A}^{12}}{2\pi }\right) \right) +O_{\varepsilon }\left( x^{1+\theta +\varepsilon }\right)
   \end{split}
\end{equation}
holds for any real number $\varepsilon >0,$ where $\mathcal{A}\approx 1.282\;427\;129\ldots $\ is the Glaisher-Kinkelin constant.
The inequality $\theta \geqslant 1/4$ is well-known,
and, from the work of Huxley \cite{hux} 
we know that $\theta \leqslant 131/416\approx 0.3149.$\\\\
The aim of this paper is first to work with a function generalizing the function $g$ and prove an asymptotic formula for its average order similarly as in $\left( 1\right) .$ In sections 5, 6 and 7 we will establish estimates for the lcm-sum function, and for reciprocals of the gcd-sum and lcm-sum functions. We begin with classical notation.

\bigskip

\noindent 1. {\it Multiplicative functions}. The following arithmetic functions are well-known.
\begin{equation*}
   \begin{split}
     \text{Id}^a\left( n\right) &=n^a\quad \left( a\in \mathbb{Z}^{*}\right)\\
     {\bf 1}\left( n\right) &=1\\
   \end{split}
\end{equation*}
and $\mu$, $\varphi$, $\sigma_k$ and $\tau_k$ are respectively the M\"obius function, the Euler totient function, the sum of $k$th powers of divisors function and the $k$th Piltz divisor function. Recall that $\tau _k$ can be defined by $\tau _k=\underset{k \, \mathrm{times}}{\underbrace{\mathbf{1} \ast \cdots  \ast {\mathbf{1}}}}$ for any integer $k\geqslant 1$ and that $\tau _2=\tau .$ We also have $\sigma _k=\sum_{d\mid n}d^k$ and $\sigma _0=\tau .$

\bigskip

\noindent 2. {\it Exponent in the Dirichlet-Piltz divisor problem}. For any integer $k\geqslant 2,$ $\theta _k$ is defined to be the smallest positive real number such that the asymptotic formula
\begin{equation}
   \begin{split}
     \sum_{n\leqslant x}\tau _k\left( n\right) =x\mathcal{P}_{k-1}\left( \log x\right) +O_{\varepsilon ,k}\left( x^{\theta _k+\varepsilon }\right)
   \end{split}
\end{equation}
holds for any real number $\varepsilon >0.$ Here $\mathcal{P}_{k-1}$ is a polynomial of degree $k-1$ with real coefficients, the leading coefficient being $\frac{1}{\left( k-1\right) !}.$ It is now well-known that $\frac 13\leqslant \theta _3\leqslant \frac{43}{96}$ and that $\frac{k-1}{2k}\leqslant \theta _k\leqslant \frac{k-1}{k+2}$ for $k\geqslant 4$ (see \cite{ivi}, for example).\\\\
By convention, we set 
$$\tau _0\left( n\right) = \begin{cases} 1, & \mathrm{if\ } n=1;\\ 0, & \mathrm{otherwise;}\end{cases}$$
and $\theta _1=0$.

\section{A generalization of the gcd-sum function}

\begin{def1} 
We define the sequence of arithmetic functions $f_{k,j}\left( n\right) $ in the following way.\\\\	
$\left( i\right) $ For any integers $j,n\geqslant 1$, we set\\\\
\begin{equation*}
   \begin{split}
     f_{1,j}\left( n\right) &= \begin{cases} 1, & \mathrm{if\ } (n,j)=1;\\ 0, & \mathrm{otherwise;} \end{cases}\\
     f_{2,j}\left( n\right) &= \begin{cases} (n,j), & \mathrm{if\ } j \leqslant n;\\ 0, & \mathrm{otherwise}. \end{cases}
   \end{split}
\end{equation*}
$\left( ii\right) $ For any integers $j\geqslant 1$ and $k\geqslant 3,$ we set $$f_{k,j}=f_{2,j}*\left( \text{Id}\cdot \tau _{k-2}\right) .$$
\end{def1}
\begin{def2}
For any integers $n,k\geqslant 1,$ we define the sequence of arithmetic functions $g_k\left( n\right)$ by $$g_k\left( n\right) =\sum_{j=1}^nf_{k,j}\left( n\right) .$$
\end{def2}

\paragraph{Examples.}
\begin{equation*}
   \begin{split}
     g_1\left( n\right) &=\underset{\left( n,j\right) =1}{\sum_{j=1}^n}1=\varphi \left( n\right),\\
     g_2\left( n\right) &=\sum_{j=1}^n\left( j,n\right) =g\left( n\right),\\
     g_3\left( n\right) &=\sum_{j=1}^n\underset{d\geqslant j}{\sum_{d\mid n}}\frac nd\left( j,d\right),\\
     &\vdots\\
     g_k\left( n\right) &=\sum_{j=1}^n\sum_{d_{k-2}\mid n}\sum_{d_{k-3}\mid d_{k-2}}\cdots \underset{d_1\geqslant j}{\sum_{d_1\mid d_2}}\frac n{d_1}\left( j,d_1\right).
   \end{split}
\end{equation*}

Now we are able to state the following result.

\begin{theo1}
\label{th1}
Let $\varepsilon >0$ be any real number and $k\geqslant 1$ any integer. Then, for any real number $x\geqslant 1$ sufficiently large, we have $$\sum_{n\leqslant x}g_k\left( n\right) =\frac{x^2}{2\zeta \left( 2\right) }\mathcal{R}_{k-1}\left( \log x\right) +O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right)$$ where $\mathcal{R}_{k-1}$\ is a polynomial of degree $k-1$ and leading coefficient $\frac 1{\left( k-1\right) !}.$ The following table gives $\mathcal{R}_{k-1}$\ for $k\in \left\{ 1,2,3\right\}$
\begin{center}
\begin{tabular}{|c|c|c|c|}
\hline
 k & $\mathrm{1}$ & $\mathrm{2}$ & $\mathrm{3}$\\
\hline
 & & &\\
 $\mathcal{R}_{k-1}$ & $\mathrm{1}$ & $X+\gamma -\dfrac 12+\log \left( \dfrac{\mathcal{A}^{12}}{2\pi }\right) $ & $\dfrac{X^2}2+\alpha X+\beta $\\
& & & \\
\hline
\end{tabular}
\end{center}
where
\begin{equation*}
   \begin{split}
     \alpha &=2\gamma -\dfrac 12+\log \left( \dfrac{\mathcal{A}^{12}}{2\pi }\right)\\
     \beta &=-\frac{\zeta ^{\,\prime \prime }\left( 2\right) }{2\zeta \left( 2\right) }+\left( \gamma -\log \left( \dfrac{\mathcal{A}^{12}}{2\pi }\right) \right) ^2-\left( 3\gamma -\frac 12\right) \left( \gamma -\log \left( \dfrac{\mathcal{A}^{12}}{2\pi }\right) \right)\\
             &-\frac 14\left( 12\gamma _1-12\gamma ^2+6\gamma -1\right)
   \end{split}
\end{equation*}
and
\begin{center}
\begin{tabular}{|c|c|}
\hline
$\mathrm{Constant}$ & $\mathrm{Name}$\\
\hline
$\gamma \approx 0.577\;215\;664\ldots $ & $\mathrm{Euler-Mascheroni}$\\
\hline
$\gamma _1\approx -0.072\;815\;845\ldots $ & $\mathrm{Stieltjes}$\\
\hline
$\mathcal{A}\approx 1.282\;427\;129\ldots $ & $\mathrm{Glaisher-Kinkelin}$\\
\hline
\end{tabular}
\end{center}
\end{theo1}
\section{Main properties of the function $g_k$}
The following lemma lists the main tools used in the proof of Theorem~\ref{th1}.
\begin{lem1}
\label{lm1}
For any integer $k\geqslant 1,$\ we have $$g_{k+1}=g_k \ast \mathrm{Id}$$ and then $$g_k=\varphi  \ast \left( \mathrm{Id}\cdot \tau _{k-1}\right) .$$ Moreover, we have
\begin{equation}
   \begin{split}
     g_k=\mu \ast \left( \mathrm{Id}\cdot \tau _k\right) .
   \end{split}
\end{equation}
Thus, the Dirichlet series $G_k\left( s\right) $\ of $g_k$\ is absolutely convergent in the half-plane $\Re s>2,$\ and has an analytic continuation to a meromorphic function defined on the whole complex plane with value $$G_k\left( s\right) =\frac{\zeta \left( s-1\right) ^k}{\zeta \left( s\right) }.$$
\end{lem1}
\begin{proof}
Broughan already proved the first relation for $k=1$ 
(see \cite[Thm.\ 4.7]{brou}), but, for the sake of completeness, we give here another proof.
\begin{equation*}
   \begin{split}
     \left( g_1*\text{Id}\right) \left( n\right) &=\left( \varphi *\text{Id}\right) \left( n\right) =\sum_{d\mid n}d\varphi \left( \frac nd\right)\\
                                                         &=\sum_{d\mid n}d\underset{\left( k,n/d\right) =1}{\sum_{k\leqslant n/d}}1=\sum_{d\mid n}d\underset{\left( j,n\right) =d}{\overset{n}{\sum_{j=1}}}1\\
                                                         &=\sum_{j=1}^n\left( j,n\right) =\sum_{j=1}^nf_{2,j}\left( n\right) =g_2\left( n\right).
    \end{split}
\end{equation*}
For $k=2,$ we get $$\left( g_2*\text{Id}\right) \left( n\right) =\sum_{d\mid n}\frac nd\sum_{j=1}^d\left( j,d\right) =\sum_{j=1}^n\underset{d\geqslant j}{\sum_{d\mid n}}\frac nd\left( j,d\right) =\sum_{j=1}^nf_{3,j}\left( n\right) =g_3\left( n\right) .$$ Now let us suppose $k \geqslant 3.$ We have
\begin{equation*}
   \begin{split}
     g_{k+1}\left( n\right) &=\sum_{j=1}^nf_{k+1,j}\left( n\right) =\sum_{j=1}^n\left( f_{2,j}*\left( \text{Id}\cdot \tau _{k-1}\right) \right) \left( n\right)\\
                                  &=\sum_{j=1}^n\left( f_{2,j}*\text{Id}\cdot \tau _{k-2}*\text{Id}\right) \left( n\right)\\
                                  &=\sum_{d\mid n}\frac nd\sum_{j=1}^d\left( f_{2,j}*(\text{Id}\cdot \tau _{k-2})\right) \left( d\right)=\left( g_k*\text{Id}\right) \left( n\right).                                
   \end{split}
\end{equation*}
The second relation is easily shown by induction. For the third, we have using $\varphi =\mu \ast \mathrm{Id} $
\begin{equation*}
   \begin{split}
     g_k&=\varphi *\,\left( \text{Id}\cdot \tau _{k-1}\right) =\mu *\left( \text{Id}*\,(\text{Id}\cdot \tau _{k-1})\right)\\
          &=\mu *\left( \text{Id}\cdot \left( {\bf 1}*\tau _{k-1}\right) \right) =\mu *\left( \text{Id}\cdot \tau _k\right).
   \end{split}
\end{equation*}
The last proposition comes from the equality $\left( 3\right)$ $$ g_k=\mu *\left( \text{Id}\cdot \tau _k\right) =\mu *\,\underset{k \, \mathrm{ times}}{\underbrace{\text{Id}*\cdots *\text{Id}}}$$ and the Dirichlet series of $\mu $ and Id.
\end{proof}

\section{Proof of Theorem 1}
\begin{lem2}
\label{lm2}
For any integer $k\geqslant 1$ and any real numbers $x>1$ and $\varepsilon >0,$\ we have $$\sum_{n\leqslant x}n\tau _k\left( n\right) =x^2 \mathcal{Q}_{k-1}\left( \log x\right) +O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right)$$ where $\mathcal{Q}_{k-1}$\ is a polynomial of degree $k-1$ and leading coefficient $\frac 1{2\left( k-1\right) !}.$
\end{lem2}
\begin{proof}
Using summation by parts and $\left( 2\right) $, we get
\begin{equation*}
   \begin{split}
     \sum_{n\leqslant x}n\tau _k\left( n\right) &=x\sum_{n\leqslant x}\tau _k\left( n\right) -\int_1^x\left( \sum_{n\leqslant t}\tau _k\left( n\right) \right) dt\\
                                                               &=x^2\mathcal{P}_{k-1}\left( \log x\right) +O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right) -\int_1^x\left( t\mathcal{P}_{k-1}\left( \log t\right) +O_{\varepsilon ,k}\left( t^{\theta _k+\varepsilon }\right) \right) dt.
   \end{split}
\end{equation*}
Writing $$\mathcal{P}_{k-1}\left( X\right) =\sum_{j=0}^{k-1}a_jX^j$$ with $a_{k-1}=\frac 1{\left( k-1\right) !},$ we obtain $$\sum_{n\leqslant x}n\tau _k\left( n\right) =x^2\sum_{j=0}^{k-1}a_j\left( \log x\right) ^j-\sum_{j=0}^{k-1}a_j\int_1^xt\left( \log t\right) ^jdt+O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right)$$ and the formula $$\int_1^xt\left( \log t\right) ^jdt=x^2\sum_{i=0}^j\left( -1\right) ^{j-i}\frac{j!}{2^{j+1-i}\times i!}\left( \log x\right) ^i-\left( -1\right) ^j\frac{j!}{2^{j+1}}$$ (easily proved by induction) gives
\begin{equation*}
   \begin{split}
     \sum_{n\leqslant x}n\tau _k\left( n\right) &=x^2\sum_{j=0}^{k-1}a_j\left\{ \left( \log x\right) ^j-\sum_{i=0}^j\left( -1\right) ^{j-i}\frac{j!}{2^{j+1-i}\times i!}\left( \log x\right) ^i\right\}\\
                                                               &+\sum_{i=0}^j\left( -1\right) ^j\frac{j!\,a_j}{2^{j+1}}+O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right)\\
                                                               &=x^2\sum_{j=0}^{k-1}a_j\left\{ \frac{\left( \log x\right) }2^j-\sum_{i=0}^{j-1}\left( -1\right) ^{j-i}\frac{j!}{2^{j+1-i}\times i!}\left( \log x\right) ^i\right\} +O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right)
   \end{split}
\end{equation*}
which completes the proof of the lemma.
\end{proof}

\paragraph{Remark.}
For $k=3,$ the following result is well-known (see \cite[Exer. II.3.4]{ten}, for example) $$\sum_{n\leqslant x}\tau _3\left( n\right) =x\left\{ \frac{\left( \log x\right) ^2}2+\left( 3\gamma -1\right) \log x+3\gamma ^2-3\gamma -3\gamma _1+1\right\} +O_\varepsilon \left( x^{\theta _3+\varepsilon }\right)$$ and gives
\begin{equation}
   \begin{split}
     \sum_{n\leqslant x}n\tau _3\left( n\right) =x^2\left\{ \frac{\left( \log x\right) ^2}4+\left( \frac{6\gamma -1}4\right) \log x-\frac{12\gamma _1-12\gamma ^2+6\gamma -1}8\right\} +O_\varepsilon \left( x^{1+\theta _3+\varepsilon }\right).
   \end{split}
\end{equation}
\vspace{0.5cm}
Now we are able to prove Theorem~\ref{th1}.

Using $\left( 3\right) $ we get $$\sum_{n\leqslant x}g_k\left( n\right) =\sum_{d\leqslant x}\mu \left( d\right) \sum_{m\leqslant x/d}m\tau _k\left( m\right) ,$$ and lemma~\ref{lm1} gives
\begin{equation*}
   \begin{split}
     \sum_{n\leqslant x}g_k\left( n\right) &=\sum_{d\leqslant x}\mu \left( d\right) \left\{ \left( \frac xd\right) ^2\mathcal{Q}_{k-1}\left( \log \frac xd\right) +O_{\varepsilon ,k}\left( \left( \frac xd\right) ^{1+\theta _k+\varepsilon }\right) \right\}\\
                                                         &=x^2\sum_{d\leqslant x}\frac{\mu \left( d\right) }{d^2}\mathcal{Q}_{k-1}\left( \log \frac xd\right) +O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right).
   \end{split}
\end{equation*}
Writing $$\mathcal{Q}_{k-1}\left( X\right) =\sum_{j=0}^{k-1}b_jX^j$$ with $b_{k-1}=\frac 1{2\left( k-1\right) !},$ we get
\begin{equation*}
   \begin{split}
     \sum_{n\leqslant x}g_k\left( n\right) &=x^2\sum_{d\leqslant x}\frac{\mu \left( d\right) }{d^2}\sum_{j=0}^{k-1}b_j\left( \log \frac xd\right) ^j+O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right)\\
                                                        &=x^2\sum_{j=0}^{k-1}\sum_{h=0}^j\binom jhb_j\left( \log x\right) ^{j-h}\sum_{d\leqslant x}\left( -1\right) ^h\frac{\mu \left( d\right) }{d^2}\left( \log d\right) ^h+O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right)
   \end{split}
\end{equation*}
and the equality
\begin{equation*}
   \begin{split}
     \sum_{d\leqslant x}\left( -1\right) ^h\frac{\mu \left( d\right) }{d^2}\left( \log d\right) ^h &=\sum_{d=1}^{\infty}\left( -1\right) ^h\frac{\mu \left( d\right) }{d^2}\left( \log d\right) ^h-\sum_{d>x}\left( -1\right) ^h\frac{\mu \left( d\right) }{d^2}\left( \log d\right) ^h\\
                                                        &=\left[ \frac{d^h}{ds^h}\left( \frac 1{\zeta \left( s\right) }\right) \right] _{\left[ s=2\right] }+O\left( \frac{\left( \log x\right) ^h}x\right),
   \end{split}
\end{equation*}
implies
\begin{equation*}
   \begin{split}
     \sum_{n\leqslant x}g_k\left( n\right) &=x^2\sum_{j=0}^{k-1}\sum_{h=0}^j\binom jh\left( \left[ \frac{d^h}{ds^h}\left( \frac 1{\zeta \left( s\right) }\right) \right] _{\left[ s=2\right] }\right) b_j\left( \log x\right) ^{j-h}\\
                                                        &+O\left( x\left( \log x\right) ^{k-1}\right) +O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right)\\
                                                        &=x^2\sum_{j=0}^{k-1}\sum_{h=0}^j\binom jh\left( \left[ \frac{d^h}{ds^h}\left( \frac 1{\zeta \left( s\right) }\right) \right] _{\left[ s=2\right] }\right) b_j\left( \log x\right) ^{j-h}+O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right),
   \end{split}
\end{equation*}
and writing $$\left[ \frac{d^h}{ds^h}\left( \frac 1{\zeta \left( s\right) }\right) \right] _{\left[ s=2\right] }=\frac{A_h}{2\zeta \left( 2\right) ^{h+1}}$$ with $A_h\in \mathbb{R}$ (and $A_0=2$), we obtain $$\sum_{n\leqslant x}g_k\left( n\right) =\frac{x^2}{2\zeta \left( 2\right) }\sum_{j=0}^{k-1}\sum_{h=0}^j\binom jh\frac{A_hb_j\left( \log x\right) ^{j-h}}{\zeta \left( 2\right) ^h}+O_{\varepsilon ,k}\left( x^{1+\theta _k+\varepsilon }\right)$$ which is the desired result. The leading coefficient is $\binom{k-1}0A_0b_{k-1}=\frac 1{\left( k-1\right) !}.$ The particular cases are easy to check.\\\\
(i) For $k=1,$ the result is well-known (see \cite[Exer.\ 4.14]{bor2}) $$\sum_{n\leqslant x}g_1\left( n\right) =\sum_{n\leqslant x}\varphi \left( n\right) =\frac{x^2}{2\zeta \left( 2\right) }+O\left( x\log x\right) .$$\\\\
(ii) For $k=2,$ see \cite{bor1}.\\\\
(iii) For $k=3,$ we use $\left( 4\right) $ and the computations made above. The proof of Theorem~\ref{th1} is now complete.
\section{Sums of reciprocals of the gcd}
The purpose of this section is to prove the following estimate.
\begin{theo2}
\label{th2}
For any real number $x > e$ sufficiently large,\ we have $$\sum_{n\leqslant x}\left( \sum_{j=1}^n\frac 1{\left( j,n\right) }\right) =\frac{\zeta \left( 3\right) }{2\zeta \left( 2\right) }\,x^2+O\left( x\left( \log x\right) ^{2/3}\left( \log \log x\right) ^{4/3}\right) .$$
\end{theo2}
\begin{proof}
For any integer $n\geqslant 1,$ we set $$\mathcal{G}\left( n\right) =\sum_{j=1}^n\frac 1{\left( j,n\right) }.$$ With a similar argument used in the proof of the identity $g=\varphi \ast \mathrm{Id}$ (see lemma~\ref{lm1}), it is easy to check that $$\mathcal{G}=\varphi \ast \mathrm{Id}^{-1}\text{,}$$ and thus $$\sum_{n\leqslant x}\mathcal{G}\left( n\right) =\sum_{d\leqslant x}\frac 1d\sum_{m\leqslant x/d}\varphi \left( m\right) .$$ The well-known result (see \cite{wal}, for example) $$\sum_{n\leqslant x}\varphi \left( n\right) =\frac{x^2}{2\zeta \left( 2\right) }+O\left( x\left( \log x\right) ^{2/3}\left( \log \log x\right) ^{4/3}\right) ,$$ combined with some classical computations, allows us to conclude the proof of Theorem~\ref{th2}.
\end{proof}
\section{The lcm-sum function}
\begin{def3}
For any integer $n\geqslant 1,$ we define $$l\left( n\right) =\sum_{j=1}^n\left[ n,j\right]$$ where $\left[ a,b\right] $ is the least common multiple of $a$ and $b$.
\end{def3}
\begin{lem3}
\label{lm3}
We have the following convolution identity $$l=\frac 12\left( (\mathrm{Id}^2\cdot \left( \varphi +\tau _0\right)) *\mathrm{Id}\right) .$$
\end{lem3}
\begin{proof}
We have $$\sum_{j=1}^n\frac j{\left( n,j\right) }=\sum_{d\mid n}\frac 1d\underset{\left( n,j\right) =d}{\sum_{j=1}^n}j=\sum_{d\mid n}\frac 1d\underset{\left( k,n/d\right) =1}{\sum_{k\leqslant n/d}}kd=\sum_{d\mid n}\underset{\left( k,n/d\right) =1}{\sum_{k\leqslant n/d}}k,$$ with
\begin{equation*}
   \begin{split}
     \underset{\left( k,N\right) =1}{\sum_{k\leqslant N}}k &=\sum_{d\mid N}d\mu \left( d\right) \sum_{m\leqslant N/d}m\\
                                                                              &=\frac 12\sum_{d\mid N}d\mu \left( d\right) \left\{ \frac Nd\left( \frac Nd+1\right) \right\}\\
                                                                              &=\frac N2\sum_{d\mid N}\mu \left( d\right) \left( \frac Nd+1\right) =\frac N2\left( \varphi +\tau _0\right) \left( N\right),
   \end{split}
\end{equation*}
and hence $$\sum_{j=1}^n\frac j{\left( n,j\right) }=\frac 12\sum_{d\mid n}\frac nd\left( \varphi +\tau _0\right) \left( \frac nd\right) =\frac 12\left(( \text{Id}\cdot \left( \varphi +\tau _0\right)) * {\bf 1}\right) \left( n\right) ,$$ and we conclude by noting that $$l\left( n\right) =n\sum_{j=1}^n\frac j{\left( n,j\right)}$$ which completes the proof, since Id is completely multiplicative.
\end{proof}
\begin{theo3}
\label{th3}
For any real number $x > e$ sufficiently large,\ we have the following estimate $$\sum_{n\leqslant x}\left( \sum_{j=1}^n\left[ n,j\right] \right) =\frac{\zeta \left( 3\right) }{8\zeta \left( 2\right) }\,x^4+O\left( x^3\left( \log x\right) ^{2/3}\left( \log \log x\right) ^{4/3}\right) .$$
\end{theo3}
\begin{proof}
Using lemma~\ref{lm3}, we get
\begin{equation*}
   \begin{split}
     \sum_{n\leqslant x}l\left( n\right) &=\frac 12\sum_{d\leqslant x}d\sum_{m\leqslant x/d}m^2\left( \varphi +\tau _0\right) \left( m\right)\\
                                                   &=\frac 12\sum_{d\leqslant x}d\sum_{m\leqslant x/d}m^2\varphi \left( m\right) +O\left( x^2\right)
   \end{split}
\end{equation*}
and the estimation (see \cite{wal}) $$\sum_{n\leqslant x}n^2\varphi \left( n\right) =\frac{x^4}{4\zeta \left( 2\right) }+O\left( x^3\left( \log x\right) ^{2/3}\left( \log \log x\right) ^{4/3}\right)$$ implies
\begin{equation*}
   \begin{split}
     \sum_{n\leqslant x}l\left( n\right) &=\frac 12\sum_{d\leqslant x}d\left\{ \frac 1{4\zeta \left( 2\right) }\left( \frac xd\right) ^4+O\left( \left( \frac xd\right) ^3\left( \log x\right) ^{2/3}\left( \log \log x\right) ^{4/3}\right) \right\} +O\left( x^2\right)\\
                                                   &=\frac{x^4}{8\zeta \left( 2\right) }\sum_{d=1}^\infty \frac 1{d^3} + O \left ( x^3 \left( \log x \right) ^{2/3} \left( \log \log x \right)^{4/3} \right ) +O \left ( x^2 \right ),
   \end{split}
\end{equation*}
which is the desired result.
\end{proof}
\section{Sum of reciprocals of the lcm}
We will prove the following result.
\begin{theo4}
\label{th4}
For any real number $x>1$ sufficiently large,\ we have $$\sum_{n\leqslant x}\left( \sum_{j=1}^n\frac 1{\left[ n,j\right] }\right) =\frac{\left( \log x\right) ^3}{6\zeta \left( 2\right) }+\frac{\left( \log x\right) ^2}{2\zeta \left( 2\right) }\left( \gamma +\log \left( \frac{\mathcal{A}^{12}}{2\pi }\right) \right) +O\left( \log x\right) .$$
\end{theo4}
\vspace{0.5cm}
Some useful estimates are needed.
\begin{lem4}
\label{lm4}
Set $C_{\varphi }=\log \left( \dfrac{\mathcal{A}^{12}}{2\pi }\right) \approx 1.147\;176\ldots $ For any real number $x\geqslant 1,$\ we have
\begin{equation*}
   \begin{split}
     (i) & : \sum_{n\leqslant x}\frac{\varphi \left( n\right) }{n^2}=\frac{\log x}{\zeta \left( 2\right) }+\frac{C_{\varphi }}{\zeta \left( 2\right) }+O\left( \frac{\log ex}x\right).\\
     (ii) & : \sum_{n\leqslant x}\frac{\varphi \left( n\right) }{n^2}\log \left( \frac xn\right) =\frac{\left( \log x\right) ^2}{2\zeta \left( 2\right) }+\frac{C_{\varphi }\log x}{\zeta \left( 2\right) }+O\left( 1\right).\\
     (iii) & : \frac 12\sum_{n\leqslant x}\frac{\varphi \left( n\right) }{n^2}\left( \log \left( \frac xn\right) \right) ^2=\frac{\left( \log x\right) ^3}{6\zeta \left( 2\right) }+\frac{C_{\varphi }\left( \log x\right) ^2}{2\zeta \left( 2\right) }+O\left( \log x\right).
   \end{split}
\end{equation*}
\end{lem4}
\begin{proof}
$\left( i\right) .$ Using $\varphi =\mu *$ Id, we get
\begin{equation*}
   \begin{split}
     \sum_{n\leqslant x}\frac{\varphi \left( n\right) }{n^2} &= \sum_{d\leqslant x}\frac{\mu \left( d\right) }{d^2}\sum_{m\leqslant x/d}\frac 1m\\
                                                                             &= \sum_{d\leqslant x}\frac{\mu \left( d\right) }{d^2}\left\{ \log \left( \frac xd\right) +\gamma +O\left( \frac dx\right) \right\}\\
                                                                             &= \left( \log x+\gamma \right) \sum_{d\leqslant x}\frac{\mu \left( d\right) }{d^2}-\sum_{d\leqslant x}\frac{\mu \left( d\right) \log d}{d^2}+O\left( \frac 1x\sum_{d\leqslant x}\frac 1d\right)\\
                                                                             &=\frac{\log x}{\zeta \left( 2\right) }+\frac \gamma {\zeta \left( 2\right) }-\frac{\zeta ^{\,\prime }\left( 2\right) }{\left( \zeta \left( 2\right) \right) ^2}+O\left( \frac{\log ex}x\right).
   \end{split}
\end{equation*}
Recall that $\dfrac{\zeta ^{\,\prime }\left( 2\right) }{\zeta \left( 2\right) }=\gamma -C_{\varphi }$.\\\\
$\left( ii\right) $ and $\left( iii\right) .$ Abel's summation and estimate $\left( i \right) .$ We leave the details to the reader.
\end{proof}
\vspace{0.5cm}
Now we are able to show Theorem~\ref{th4}.
For any integer $n\geqslant 1,$ we set $$\mathcal{L}\left( n\right) =\sum_{j=1}^n\frac 1{\left[ n,j\right] }.$$
Since
\begin{equation*}
   \begin{split}
     \mathcal{L}\left( n\right) &= \frac 1n\sum_{j=1}^n\frac{\left( n,j\right) }j=\frac 1n\sum_{d\mid n}d\underset{\left( j,n\right) =d}{\sum_{j=1}^n}\frac 1j\\
                                       &= \frac 1n\sum_{d\mid n}d\underset{\left( k,n/d\right) =1}{\sum_{k\leqslant n/d}}\frac 1{kd}=\frac 1n\sum_{d\mid n}\underset{\left( k,n/d\right) =1}{\sum_{k\leqslant n/d}}\frac 1k,
   \end{split}
\end{equation*}
we get
\begin{equation*}
   \begin{split}
     \sum_{n\leqslant x}\mathcal{L}\left( n\right) &=\sum_{n\leqslant x}\frac 1n\sum_{d\mid n}\underset{\left( k,n/d\right) =1}{\sum_{k\leqslant n/d}}\frac 1k\\
                                                                   &=\sum_{d\leqslant x}\frac 1d\sum_{h\leqslant x/d}\frac 1h\underset{\left( k,h\right) =1}{\sum_{k\leqslant h}}\frac 1k\\
                                                                   &=\sum_{d\leqslant x}\frac 1d\sum_{h\leqslant x/d}\frac 1h\sum_{\delta \mid h}\frac{\mu \left( \delta \right) }\delta \sum_{m\leqslant h/\delta }\frac 1m\\
                                                                   &=\sum_{d\leqslant x}\frac 1d\sum_{\delta \leqslant x/d}\frac{\mu \left( \delta \right) }{\delta ^2}\sum_{a\leqslant x/\left( d\delta \right) }\frac 1a\sum_{m\leqslant a}\frac 1m\\
                                                                   &=\sum_{d\leqslant x}\sum_{\delta d\leqslant x}\frac 1d\frac{\mu \left( \delta \right) }{\delta ^2}\sum_{a\leqslant x/\left( d\delta \right) }\frac 1a\sum_{m\leqslant a}\frac 1m\\
                                                                   &=\sum_{n\leqslant x}\frac 1{n^2}\sum_{d\mid n}d\mu \left( \frac nd\right) \sum_{a\leqslant x/n}\frac 1a\sum_{m\leqslant a}\frac 1m,
   \end{split}
\end{equation*}
and the convolution identity $\varphi =\mu \ast \mathrm{Id}$ implies that $$\sum_{n\leqslant x}\mathcal{L}\left( n\right) =\sum_{n\leqslant x}\frac{\varphi \left( n\right) }{n^2}\sum_{a\leqslant x/n}\frac 1a\sum_{m\leqslant a}\frac 1m.$$ Thus
\begin{equation*}
   \begin{split}
     \sum_{n\leqslant x}\mathcal{L}\left( n\right) &=\sum_{n\leqslant x}\frac{\varphi \left( n\right) }{n^2}\sum_{a\leqslant x/n}\frac 1a\left\{ \log a+\gamma +O\left( \frac 1a\right) \right\}\\
                                                                   &=\sum_{n\leqslant x}\frac{\varphi \left( n\right) }{n^2}\left\{ \frac 12\left( \log \frac xn\right) ^2+\gamma \left( \log \frac xn\right) +O\left( 1\right) \right\}\\
                                                                   &=\frac{\left( \log x\right) ^3}{6\zeta \left( 2\right) }+\frac{C_{\varphi }\left( \log x\right) ^2}{2\zeta \left( 2\right) }+\frac{\gamma \left( \log x\right) ^2}{2\zeta \left( 2\right) }+O\left( \log x\right)
   \end{split}
\end{equation*}
where $C_{\varphi }=\log \left( \dfrac{\mathcal{A}^{12}}{2\pi }\right) ,$ which concludes the proof.\\\\

\section{Acknowledgment} 

I am indebted to the referee for his valuable suggestions.

\begin{thebibliography}{9}

\bibitem{bor1} O. Bordell\`es, \href{http://www.cs.uwaterloo.ca/journals/JIS/VOL10/Bordelles/bordelles90.html}{A note on the average order of the gcd-sum function}, {\it J. Integer Sequences} {\bf 10} (2007), Article 07.3.3.

\bibitem{bor2} O. Bordell\`es, {\it Th\`emes d'Arithm\'etique}, Editions Ellipses, 2006.

\bibitem{brou} K. A. Broughan, \href{http://www.cs.uwaterloo.ca/journals/JIS/VOL4/BROUGHAN/gcdsum.html}{\tt The gcd-sum function}, {\it J. Integer Sequences} {\bf 4} (2001), Article 01.2.2.  \\
Errata, April 16, 2007,
\href{http://www.cs.uwaterloo.ca/journals/JIS/VOL4/BROUGHAN/errata1.pdf}{\tt http://www.cs.uwaterloo.ca/journals/JIS/VOL4/BROUGHAN/errata1.pdf}.

\bibitem{brou2} K. A. Broughan, \href{http://www.cs.uwaterloo.ca/journals/JIS/VOL10/Broughan/broughan1.html}{The average order of the Dirichlet series of the gcd-sum function}, {\it J. Integer Sequences} {\bf 10} (2007), Article 07.4.2.

\bibitem{hux} M. N. Huxley, Exponential sums and lattice points III, {\it Proc. London Math. Soc.} {\bf 87} (2003), 591--609.

\bibitem{ivi} 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, in W. Schwarz and J. Steuding, eds.,
{\it Conference on Elementary and Analytic Number Theory},
Frank Steiner Verlag, 2006, pp.\ 89--128.

\bibitem{ten} G. Tenenbaum, {\it Introduction \`a la Th\'eorie
Analytique et Probabiliste des Nombres}, Soci\'et\'e Math\'ematique de
France, 1995.

\bibitem{wal} A. Walfisz, {\it Weylsche Exponentialsummen in der neueren Zahlentheorie}, Leipzig BG Teubner, 1963.

\end{thebibliography}


\bigskip
\hrule
\bigskip

\noindent 2000 {\it Mathematics Subject Classification}:
Primary 11A25; Secondary 11N37.

\noindent \emph{Keywords: } greatest common divisor, average order,
Dirichlet convolution.

\bigskip
\hrule
\bigskip

\vspace*{+.1in}
\noindent
Received July 2 2007;
revised version received  August 27 2007.
Published in {\it Journal of Integer Sequences}, August 27 2007.

\bigskip
\hrule
\bigskip

\noindent
Return to
\htmladdnormallink{Journal of Integer Sequences home page}{http://www.cs.uwaterloo.ca/journals/JIS/}.
\vskip .1in


\end{document}

                                                                                

