OFFSET
1,3
LINKS
Seiichi Manyama, Table of n, a(n) for n = 1..5000
FORMULA
G.f.: -Sum_{k>0} (-x)^k / (1 - k * x^k).
If p is an odd prime, a(p) = 2.
MATHEMATICA
a[n_] := DivisorSum[n, (-1)^(#-1) * #^(n/# - 1) &]; Array[a, 50] (* Amiram Eldar, Aug 09 2023 *)
PROG
(PARI) a(n) = sumdiv(n, d, (-1)^(d-1)*d^(n/d-1));
(PARI) my(N=50, x='x+O('x^N)); Vec(-sum(k=1, N, (-x)^k/(1-k*x^k)))
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Seiichi Manyama, Jan 14 2023
STATUS
approved