OFFSET
0,3
LINKS
Amiram Eldar, Table of n, a(n) for n = 0..10000
R. A. Smith and M. V. Subbarao, The average number of divisors in an arithmetic progression, Canadian Mathematical Bulletin, Vol. 24, No. 1 (1981), pp. 37-41.
FORMULA
a(n) = n*log(n)/3 + c*n + O(n^(1/3)*log(n)), where c = gamma(1,3) - (1 - gamma)/3 = A256425 - (1 - A001620)/3 = 0.536879... (Smith and Subbarao, 1981). - Amiram Eldar, Nov 25 2023
MATHEMATICA
d[n_] := DivisorSum[n, 1 &, Mod[#, 3] == 1 &]; d[0] = 0; Accumulate@Array[d, 100, 0] (* Amiram Eldar, Nov 25 2023 *)
PROG
(PARI) a(n)=sum(k=0, n\3, (n\(3*k+1)))
(Maxima) A218442[n]:=sum(floor(n/(3*k+1)), k, 0, n)$
makelist(A218442[n], n, 0, 80); /* Martin Ettl, Oct 29 2012 */
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Oct 28 2012
STATUS
approved