OFFSET
1,6
COMMENTS
Dirichlet proved this sequence is O(n^1/2).
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..10000
Wikipedia, Divisor summatory function
Wikipedia, Euler-Mascheroni constant
FORMULA
a(n) = Sum(A000005(k), k=1..n) - n*(log(n) + 0.1544313298), where the decimal is (approximately) 2*Gamma-1.
MATHEMATICA
s = 0; Table[s = s + DivisorSigma[0, n]; Floor[s - n*(Log[n] + 2*EulerGamma - 1)], {n, 100}] (* T. D. Noe, Nov 04 2013 *)
PROG
(JavaScript)
function sigma(n, k) {
var j, s, sn;
s=0;
sn=Math.sqrt(n);
for (j=1; j<sn; j++) if (n%j==0) s+=Math.pow(j, k)+Math.pow(n/j, k);
if (n%sn==0) s+=Math.pow(sn, k);
return s;
}
c=0;
for (i=1; i<100; i++) {
c+=sigma(i, 0);
document.write(Math.floor(c-i*(Math.log(i)+0.1544313298))+", ");
}
CROSSREFS
KEYWORD
sign
AUTHOR
Jon Perry, Oct 24 2013
STATUS
approved