OFFSET
1,2
COMMENTS
Every inequality in number theory of the form f(n) >= g(n) is a potential source of a sequence floor(f(n))-ceiling(g(n)).
That sequence can be negative (e.g., floor(2/3)-ceiling(1/3)=-1), but the other 3 differences floor(f(n))-floor(g(n)), ceiling(f(n))-ceiling(g(n)), and ceiling(f(n))-floor(g(n)) are nonnegative. - Jonathan Sondow, Oct 20 2013
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Jorge Luis Cimadevilla Villacorta, Certain inequalities associated with the divisor function, Amer. Math. Monthly, 120 (2013), 832-837. (Shows that a(n) >= 0.)
FORMULA
a(n) = (2*log(2)/3) * n + O(n^(1/3)*log(n)). - Amiram Eldar, Apr 12 2024
MAPLE
with(numtheory);
f:=proc(n, a, b, c, d) local i; add(tau(a*i+b), i=1..n) - add(tau(c*i+d), i=1..n); end;
[seq(f(n, 24, 1, 6, 1), n=1..120)];
# More efficient:
ListTools:-PartialSums([seq(numtheory:-tau(24*i+1)-numtheory:-tau(6*i+1), i=1..120)]); # Robert Israel, Jan 03 2020
MATHEMATICA
R = Range[100];
Accumulate[DivisorSigma[0, 24R+1] - DivisorSigma[0, 6R+1]] (* Jean-François Alcover, Jan 31 2023 *)
PROG
(PARI) vector(100, n, sum(i=1, n, numdiv(24*i+1)) - sum(i=1, n, numdiv(6*i+1))) \\ Michel Marcus, Oct 09 2014
(Magma) [&+[#Divisors(24*i+1):i in [1..n]] - &+[#Divisors(6*i+1):i in [1..n]]:n in [1..85]]; // Marius A. Burtea, Jan 03 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 17 2013
STATUS
approved