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 A218443 #26 Nov 25 2023 08:03:54 %S A218443 0,0,1,1,2,3,4,4,6,6,8,9,10,10,12,13,15,16,17,17,20,20,22,23,25,26,28, %T A218443 28,30,31,33,33,36,37,39,41,42,42,44,44,48,49,51,51,54,55,57,58,60,60, %U A218443 63,64,66,67,68,70,74,74,76,77,80,80,82,82,85,87,89,89,92,93,97,98,100,100,102,103,105,107,109,109 %N A218443 a(n) = Sum_{k=0..n} floor(n/(3k+2)). %H A218443 Robert Israel, <a href="/A218443/b218443.txt">Table of n, a(n) for n = 0..10000</a> %H A218443 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 A218443 G.f.: Sum_{k>=0} x^(3*k+2)/((1-x^(3*k+2))*(1-x)). - _Robert Israel_, Feb 28 2017 %F A218443 a(n) = n*log(n)/3 + c*n + O(n^(1/3)*log(n)), where c = gamma(2,3) - (1 - gamma)/3 = A256843 - (1 - A001620)/3 = -0.0677207... (Smith and Subbarao, 1981). - _Amiram Eldar_, Nov 25 2023 %p A218443 N:= 100: # to get a(0)..a(N) %p A218443 A001822:= Vector(N+1): %p A218443 for m from 2 to N by 3 do %p A218443 L:= [seq(i,i=m+1..N+1,m)]: %p A218443 A001822[L]:= map(`+`,A001822[L],1) %p A218443 od: %p A218443 ListTools:-PartialSums(convert(A001822,list)); # _Robert Israel_, Feb 28 2017 %t A218443 Table[Sum[Floor[n/(3k+2)],{k,0,n}],{n,0,80}] (* _Harvey P. Dale_, Jun 22 2013 *) %t A218443 d[n_] := DivisorSum[n, 1 &, Mod[#, 3] == 2 &]; d[0] = 0; Accumulate@Array[d, 100, 0] (* _Amiram Eldar_, Nov 25 2023 *) %o A218443 (PARI) a(n)=sum(k=0,n\3,(n\(3*k+2))) %o A218443 (Maxima) A218443[n]:=sum(floor(n/(3*k+2)),k,0,n)$ %o A218443 makelist(A218443[n],n,0,80); /* _Martin Ettl_, Oct 29 2012 */ %Y A218443 Partial sums of A001822. %Y A218443 Cf. A001620, A218442, A256843. %K A218443 nonn,easy %O A218443 0,5 %A A218443 _Benoit Cloitre_, Oct 28 2012