OFFSET
1,3
COMMENTS
a(n) is the sum of indices of prime divisors p|n such that n/p is odd, minus the sum of indices of prime divisors p|n such that n/p is even.
LINKS
FORMULA
a(n) = -Sum_{p|n, p prime} (-1)^(n/p) * pi(p), where pi = A000720.
MATHEMATICA
nmax = 72; CoefficientList[Series[Sum[k x^Prime[k]/(1 + x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
Table[-DivisorSum[n, (-1)^(n/#) PrimePi[#] &, PrimeQ[#] &], {n, 1, 72}]
PROG
(PARI) a(n) = my(f=factor(n)[, 1]); sum(k=1, #f, if ((n/f[k]) % 2, primepi(f[k]), -primepi(f[k]))); \\ Michel Marcus, Aug 19 2021
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Aug 18 2021
STATUS
approved