login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A332422 If n = Product (p_j^k_j) then a(n) = Sum ((-1)^(pi(p_j) + 1) * pi(p_j)), where pi = A000720. 5
0, 1, -2, 1, 3, -1, -4, 1, -2, 4, 5, -1, -6, -3, 1, 1, 7, -1, -8, 4, -6, 6, 9, -1, 3, -5, -2, -3, -10, 2, 11, 1, 3, 8, -1, -1, -12, -7, -8, 4, 13, -5, -14, 6, 1, 10, 15, -1, -4, 4, 5, -5, -16, -1, 8, -3, -10, -9, 17, 2, -18, 12, -6, 1, -3, 4, 19, 8, 7, 0, -20, -1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
Sum of odd indices of distinct prime factors of n minus the sum of even indices of distinct prime factors of n.
LINKS
FORMULA
G.f.: Sum_{k>=1} (-1)^(k + 1) * k * x^prime(k) / (1 - x^prime(k)).
EXAMPLE
a(66) = a(2 * 3 * 11) = a(prime(1) * prime(2) * prime(5)) = 1 - 2 + 5 = 4.
MATHEMATICA
a[n_] := Plus @@ ((-1)^(PrimePi[#[[1]]] + 1) PrimePi[#[[1]]] & /@ FactorInteger[n]); Table[a[n], {n, 1, 72}]
nmax = 72; CoefficientList[Series[Sum[(-1)^(k + 1) k x^Prime[k]/(1 - x^Prime[k]), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
CROSSREFS
Sequence in context: A347103 A255810 A210256 * A229944 A366421 A218533
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Feb 12 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 09:23 EDT 2024. Contains 371782 sequences. (Running on oeis4.)