OFFSET
1,2
FORMULA
G.f.: 1/3 * Sum_{k>=1} (3*x)^k / (1 + x^k).
If p is an odd prime, a(p) = 1 + 3^(p-1).
PROG
(PARI) a(n) = sumdiv(n, d, (-1)^(d-1)*3^(n/d-1));
(PARI) my(N=30, x='x+O('x^N)); Vec(sum(k=1, N, (3*x)^k/(1+x^k))/3)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Seiichi Manyama, May 29 2024
STATUS
approved