login
A218443
a(n) = Sum_{k=0..n} floor(n/(3k+2)).
2
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, 28, 30, 31, 33, 33, 36, 37, 39, 41, 42, 42, 44, 44, 48, 49, 51, 51, 54, 55, 57, 58, 60, 60, 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
OFFSET
0,5
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
G.f.: Sum_{k>=0} x^(3*k+2)/((1-x^(3*k+2))*(1-x)). - Robert Israel, Feb 28 2017
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
MAPLE
N:= 100: # to get a(0)..a(N)
A001822:= Vector(N+1):
for m from 2 to N by 3 do
L:= [seq(i, i=m+1..N+1, m)]:
A001822[L]:= map(`+`, A001822[L], 1)
od:
ListTools:-PartialSums(convert(A001822, list)); # Robert Israel, Feb 28 2017
MATHEMATICA
Table[Sum[Floor[n/(3k+2)], {k, 0, n}], {n, 0, 80}] (* Harvey P. Dale, Jun 22 2013 *)
d[n_] := DivisorSum[n, 1 &, Mod[#, 3] == 2 &]; 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+2)))
(Maxima) A218443[n]:=sum(floor(n/(3*k+2)), k, 0, n)$
makelist(A218443[n], n, 0, 80); /* Martin Ettl, Oct 29 2012 */
CROSSREFS
Partial sums of A001822.
Sequence in context: A081328 A179276 A213635 * A326035 A205787 A072455
KEYWORD
nonn,easy
AUTHOR
Benoit Cloitre, Oct 28 2012
STATUS
approved