login
A332424
If n = Product (p_j^k_j) then a(n) = Sum ((-1)^(pi(p_j) + 1) * p_j), where pi = A000720.
1
0, 2, -3, 2, 5, -1, -7, 2, -3, 7, 11, -1, -13, -5, 2, 2, 17, -1, -19, 7, -10, 13, 23, -1, 5, -11, -3, -5, -29, 4, 31, 2, 8, 19, -2, -1, -37, -17, -16, 7, 41, -8, -43, 13, 2, 25, 47, -1, -7, 7, 14, -11, -53, -1, 16, -5, -22, -27, 59, 4, -61, 33, -10, 2, -8, 10, 67, 19, 20
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.
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
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Feb 12 2020
STATUS
approved