Let $Q$ be the set of squarefree numbers. I'd like to know estimates of following sums:
$$ \sum\_{\substack{n\leq x\\ n\in Q\\}}\log n \qquad\text{and}\qquad \sum\_{\substack{n\leq x\\ n\in Q\\}} n. $$
These estimates may be known in the literature but I don't find an appropriate reference.



Estimate $ \sum_{\substack{n\leq x\\ n\in Q\\}}\log n$ and $\sum_{\substack{n\leq x\\ n\in Q\\}} n$ where $Q$ is the square-free numbers
We can use the asymptotic formula


$$\displaystyle \sum\_{\substack{n \leq x \\ n \in Q}} 1 = \frac{6x}{\pi^2} + O(x^{1/2}).$$


This asymptotic formula is very standard and is easy to prove. For a fixed square-free integer $m$, put $N\_m(x)$ for the number of positive integers $1 \leq n \leq x$ such that $m^2 | n$. Then it is clear that


$$\displaystyle N\_m(x) = \frac{x}{m^2} + O (1).$$


Further, suppose that $n \leq x$ is divisible by a square $m^2$ with $m$ square-free. Then clearly $m \leq \sqrt{x}$. Using inclusion-inclusion we therefore conclude that


$$\sum\_{\substack{n \leq x \\ n \in Q}} 1 = \sum\_{m \leq \sqrt{x}} \mu(m) N\_m(x).$$


Using the expression for $N\_m(x)$ above we then find


$$\sum\_{\substack{n \leq x \\ n \in Q}} 1 = \sum\_{m \leq \sqrt{x}} \mu(m) \left(\frac{x}{m^2} + O(1) \right) = \sum\_{m \leq \sqrt{x}} \frac{\mu(m)x}{m^2} + O (\sqrt{x}).$$


The sum on the right can be given in terms of an Euler product. In particular, using the fact that


$$\displaystyle \frac{1}{\zeta(s)} = \prod\_p \left(1 - \frac{1}{p^s} \right)$$


we find that


$$\displaystyle \sum\_{m = 1}^\infty \frac{\mu(m)}{m^2} = \prod\_p \left(1 - \frac{1}{p^2} \right) = \frac{6}{\pi^2}.$$


Note that


$$\displaystyle \frac{6}{\pi^2} = \sum\_{m \leq \sqrt{x}} \frac{\mu(m)}{m^2} + O \left(\frac{1}{\sqrt{x}} \right).$$


Hence


$$\displaystyle \sum\_{\substack{n \leq x \\ n \in Q}} = \frac{6x}{\pi^2} + O (\sqrt{x}),$$


as claimed.


Using this asymptotic formula the two sums you asked for are now easy to obtain using partial summation. In particular we have


\begin{align\*} \sum\_{\substack{n \leq x \\ n \in Q}} \log(n) & = \log x \sum\_{\substack{n \leq x \\ n \in Q}} 1 - \int\_1^x \frac{1}{t} \left(\sum\_{\substack{n \leq t \\ n \in Q}} 1 \right) dt \\
& = \frac{6 x \log x}{\pi^2} + O(\sqrt{x} \log x) - \int\_1^x \left(\frac{6}{\pi^2} + O(t^{-1/2}) \right) dt \\
& = \frac{6 x( \log x - 1)}{\pi^2} + O(\sqrt{x} \log x)
\end{align\*}


and


\begin{align\*} \sum\_{\substack{n \leq x \\ n \in Q}} n & = x \sum\_{\substack{n \leq x \\ n \in Q}} 1 - \int\_1^x \left(\sum\_{\substack{n \leq t \\ n \in Q}} 1 \right) dt \\
& = \frac{6 x^2}{\pi^2} + O(x^{3/2}) - \int\_1^x \left(\frac{6t}{\pi^2} + O(t^{1/2}) \right) dt \\
& = \frac{3 x^2}{\pi^2} + O(x^{3/2}).
\end{align\*}


