This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A218442 #21 Nov 25 2023 08:03:08 %S A218442 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, %T A218442 41,43,44,48,49,51,53,56,57,59,61,63,65,67,69,73,74,76,78,81,82,84,85, %U A218442 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 %N A218442 a(n) = Sum_{k=0..n} floor(n/(3*k + 1)). %H A218442 Amiram Eldar, <a href="/A218442/b218442.txt">Table of n, a(n) for n = 0..10000</a> %H A218442 R. A. Smith and M. V. Subbarao, <a href="https://doi.org/10.4153/CMB-1981-005-3">The average number of divisors in an arithmetic progression</a>, Canadian Mathematical Bulletin, Vol. 24, No. 1 (1981), pp. 37-41. %F A218442 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 %t A218442 d[n_] := DivisorSum[n, 1 &, Mod[#, 3] == 1 &]; d[0] = 0; Accumulate@Array[d, 100, 0] (* _Amiram Eldar_, Nov 25 2023 *) %o A218442 (PARI) a(n)=sum(k=0,n\3,(n\(3*k+1))) %o A218442 (Maxima) A218442[n]:=sum(floor(n/(3*k+1)),k,0,n)$ %o A218442 makelist(A218442[n],n,0,80); /* _Martin Ettl_, Oct 29 2012 */ %Y A218442 Partial sums of A001817. %Y A218442 Cf. A001620, A218443, A256425. %K A218442 nonn,easy %O A218442 0,3 %A A218442 _Benoit Cloitre_, Oct 28 2012