OFFSET
1,3
COMMENTS
Also number of divisors of 3*n-1 of form 3*k+1 (or 3*k+2).
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..10000
FORMULA
G.f.: Sum_{k>0} x^k/(1 - x^(3*k-1)).
G.f.: Sum_{k>0} x^(2*k-1)/(1 - x^(3*k-2)).
Sum_{k=1..n} a(k) = (log(n) + 2*gamma - 1 + 2*log(3))*n/3 + O(n^(1/3)*log(n)), where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 26 2022
MATHEMATICA
a[n_] := DivisorSigma[0, 3*n-1]/2; Array[a, 100] (* Amiram Eldar, Dec 21 2022 *)
PROG
(PARI) a(n) = numdiv(3*n-1)/2;
(PARI) a(n) = sumdiv(3*n-1, d, d%3==1);
(PARI) a(n) = sumdiv(3*n-1, d, d%3==2);
(PARI) my(N=100, x='x+O('x^N)); Vec(sum(k=1, N, x^k/(1-x^(3*k-1))))
(PARI) my(N=100, x='x+O('x^N)); Vec(sum(k=1, N, x^(2*k-1)/(1-x^(3*k-2))))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, Dec 21 2022
STATUS
approved