OFFSET
1,4
COMMENTS
LINKS
FORMULA
a(n) = 0 if and only if n = 1.
a(n) <= 0 if and only if n is in A368714.
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{k>=1} (-1)^(k+1)*k*d(k) = 0.5741591604302832339078..., where d(k) = Product_{p prime} (1 - 1/(p^(k+1)*(p+1)) - Product_{p prime} (1 - 1/(p^(k-1)*(p+1)) for k >= 2, and d(1) = Product_{p prime} (1 - 1/(p^2*(p+1)).
MATHEMATICA
a[n_] := Module[{e = FactorInteger[n][[;; , 2]]}, Max[0, Max[Select[e, OddQ]]] - Max[0, Max[Select[e, EvenQ]]]]; a[1] = 0; Array[a, 100]
PROG
(PARI) a(n) = {my(e = factor(n)[, 2], e1 = select(x -> (x % 2), e), e2 = select(x -> !(x % 2), e)); if(#e1 == 0, 0, vecmax(e1)) - if(#e2 == 0, 0, vecmax(e2)); }
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Amiram Eldar, Jul 28 2024
STATUS
approved