Next asymptotic term of the average order of sigma $$
\sum_{k=1}^n\sigma(k)=\frac{\pi^2}{12}n^2+O(n\log n).
$$
Is the next asymptotic term known? That is, is there a monotonic increasing function $f(x)$ such that
$$
\sum_{k=1}^n\sigma(k)=\frac{\pi^2}{12}n^2+f(n)+o(f(n))
$$
? (I would guess something like $f(x)=cx$ if $f$ exists.) Alternately, are there monotonic increasing functions $f(x),g(x)$ with
$$
\sum_{k=1}^n\sigma(k)=\frac{\pi^2}{12}n^2+f(n)+\Omega_\pm(g(n))
$$
?
Apologies for what may be a basic reference question; I've misplaced by copy of Hardy & Wright and lack more advanced references like Apostol.
 A: In Apostol's Introduction to Analytic Number Theory he uses $\sum_{q<x}q = x^2/2+O(x)$ to prove this bound as Theorem 3.4. We may be able to do better by using the exact expression
$$
\begin{align}
\sum_{q<x} q &= \frac{1}{2}\left(\lfloor x \rfloor^2+\lfloor x \rfloor \right) \\
& = \frac{1}{2}\left((x-\{x\})^2+x-\{x\}\right) \\
& = \frac{x^2}{2} - x\{x\}+\frac{x}{2} + O(1)
\end{align}
$$
where $\{x\}$ is the fractional part of $x$.
Then proceeding in the same way
$$
\begin{align}
S(n) = \sum_{k\le n}\sigma(k) & = \sum_{d\le n}\sum_{q\le n/d}q \\
& = \sum_{d\le n}\left(\frac{n^2}{2d^2}+\frac{n}{2d}-\frac{n\{n/d\}}{d}+O(1)\right) \\
& = \frac{1}{2}n^2\zeta(2)+\frac{1}{2}n\log(n)-n\sum_{q\le n}\frac{\{n/d\}}{d}+O(n)
\end{align}
$$
Write $t(n)=n\sum\{n/d\}/d$ for the third term. Since $|\{n/d\}|<1$, $t(n)=O(n\log(n))$.
Let $S(n)=n^2\pi^2/12+F(n)$. Gronwall's Theorem gives us that there are arbitrarily large $N$ with $\sigma(N)>N\log\log(N)$. For such a $N$ we have 
$$
\begin{align}
S(N)-S(N-1) & =\sigma(N)>N\log\log(N) \\
F(N)-F(N-1) & > N \log\log(N)-(2N-1)\pi^2/12 \\
\max(|F(N)|,|F(N-1)|) & > N\log\log(N)/2 - N
\end{align}
$$
So $F(n)=\Omega(n\log\log(n))$. But $F(n) = n\log(n)/2-t(n)+O(n)$.
Write $t(n)=An\log(n)-f(n)$ with $f(n)=o(n\log(n))$. Then either:

$A\neq \frac{1}{2}$ and $F(n) = \left(\frac{1}{2}-A\right)n\log(n)+o(n\log(n))$

or

$A = \frac{1}{2}$ and $F(n) = f(n) + O(n)$, with $f(n)=o(n\log(n))$ and $f(n)=\Omega(n\log\log(n))$

Unfortunately I can't resolve which case applies, and in fact, if it's the second then I haven't really answered the question after all.
