login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A218442
a(n) = Sum_{k=0..n} floor(n/(3*k + 1)).
2
0, 1, 2, 3, 5, 6, 7, 9, 11, 12, 14, 15, 17, 19, 21, 22, 25, 26, 27, 29, 32, 34, 36, 37, 39, 41, 43, 44, 48, 49, 51, 53, 56, 57, 59, 61, 63, 65, 67, 69, 73, 74, 76, 78, 81, 82, 84, 85, 88, 91, 94, 95, 99, 100, 101, 103, 107, 109, 111, 112, 115, 117, 119, 121, 125, 127, 129, 131, 134, 135, 139, 140, 142, 144, 146, 148, 152
OFFSET
0,3
LINKS
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
Partial sums of A001817.
Sequence in context: A282131 A114148 A349690 * A255057 A349150 A354525
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Oct 28 2012
STATUS
approved