# The asymptotic behaviour of an arithmetic function related to the $K$-function

We define for integers $n\geq 1$ the arithmetic function $$S(n)=\prod_{k=1}^n\left(\varphi(k)\right)^k\tag{1}$$ where $\varphi(m)$ denotes the Euler's totient function and and $$R(n)=\prod_{k=1}^n\left(\operatorname{rad}(k)\right)^k\tag{2}$$ where $\operatorname{rad}(m)$ denotes the radical of the integer $m\geq 1$, see this Wikipedia.

Question. I would like to determine the asymptotic behaviour as $n\to\infty$ of the arithmetic function $$\log\left(\frac{R(n)S(n)}{K(n+1)}\right)=\sum_{k=2}^n k\log\varphi(\operatorname{rad}(k))\tag{3}$$ where $K(m)$ denotes the $K$-function from this Wikipedia and this other. Many thanks.

As remark we've that the function $\varphi(\operatorname{rad}(k))$ is multiplicative.

Define $$S(n):=\sum_{1\leq k\leq n} k \log \phi(\mathrm{rad}(k)).$$We will prove that $$S(n)=\frac{1}{2}n^2 (\log n)+O(n^2).$$ Let us begin by observing that the simple equality $$\phi(\mathrm{rad}(k))=\mathrm{rad}(k) \frac{\phi(k)}{k}$$ yields $S(n)=S_1(n)-S_2(n)$, where $$S_1(n):=\sum_{1\leq k\leq n} k \log \mathrm{rad}(k) \ \text{ and } \ S_2(n):=\sum_{1\leq k\leq n} k \log \frac{k}{\phi(k)}.$$ The identity $\mathrm{rad}(k)=\prod_{p\mid k} p$ shows that $$S_1(n)=\sum_{k\leq n}k\sum_{p\mid k}\log p=\sum_{p\leq n} \log p\sum_{k\leq n: p\mid k}k=\sum_{p\leq n} \log p \sum_{m\leq k/p}pm=\sum_{p\leq n}p(\log p)(n^2/(2p^2)+O(n/p)),$$ which, by the prime number theorem and Mertens' theorem, equals $$n^2/2 \sum_{p\leq n}(\log p)/p+O(n\sum_{p\leq n} \log p)= n^2/2 (\log n+O(1))+O(n^2)=\frac{n^2 \log n}{2}+O(n^2).$$ To deal with $S_2(n)$ we use the identity $k/\phi(k)=\prod_{p\mid k} (1-1/p)^{-1}$ to obtain $$S_2(n)=\sum_{p\leq n} (\log\frac{1}{1-1/p}) p(n^2/(2p^2)+O(n/p))\ll n^2 \sum_{p\leq n} \frac{1}{p^2}\ll n^2,$$ where a use of $\log (1-\epsilon)^{-1}\ll \epsilon$ for $\epsilon=1/p$ has been made.