login
A359211
a(n) = tau(3*n-1)/2, where tau(n) = number of divisors of n, cf. A000005.
9
1, 1, 2, 1, 2, 1, 3, 1, 2, 1, 3, 2, 2, 1, 3, 1, 3, 1, 4, 1, 2, 2, 3, 1, 2, 2, 5, 1, 2, 1, 3, 2, 3, 1, 4, 1, 4, 1, 3, 2, 2, 2, 4, 1, 2, 1, 6, 2, 2, 1, 4, 2, 2, 2, 3, 1, 4, 1, 5, 1, 4, 2, 3, 1, 2, 1, 6, 2, 2, 2, 3, 2, 2, 2, 6, 1, 4, 1, 3, 1, 3, 3, 4, 1, 2, 1, 6, 1, 4, 1
OFFSET
1,3
COMMENTS
Also number of divisors of 3*n-1 of form 3*k+1 (or 3*k+2).
LINKS
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