OFFSET
1,4
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
MATHEMATICA
f[p_, e_] := If[e == 2^IntegerExponent[e, 2], e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
PROG
(PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, if(f[i, 2] == 1 << valuation(f[i, 2], 2), f[i, 2], 0)); }
(Python)
from sympy import factorint
def A367169(n): return sum(e for e in factorint(n).values() if not(e&-e)^e) # Chai Wah Wu, Nov 10 2023
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Nov 07 2023
STATUS
approved