OFFSET
1,2
COMMENTS
Sum of distinct prime factors of n with odd indices minus the sum of distinct prime factors of n with even indices.
LINKS
FORMULA
G.f.: Sum_{k>=1} (-1)^(k + 1) * prime(k) * x^prime(k) / (1 - x^prime(k)).
L.g.f.: log(Product_{k>=1} (1 - x^prime(k))^((-1)^k)).
EXAMPLE
a(66) = a(2 * 3 * 11) = a(prime(1) * prime(2) * prime(5)) = 2 - 3 + 11 = 10.
MATHEMATICA
a[n_] := Plus @@ ((-1)^(PrimePi[#[[1]]] + 1) #[[1]] & /@ FactorInteger[n]); a[1] = 0; Table[a[n], {n, 1, 69}]
nmax = 69; CoefficientList[Series[Sum[(-1)^(k + 1) Prime[k] x^Prime[k]/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
CROSSREFS
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Feb 12 2020
STATUS
approved