OFFSET
1,3
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
MATHEMATICA
Accumulate[Table[n*(-1)^PrimeOmega[n], {n, 70}]] (* Harvey P. Dale, Apr 02 2015 *)
PROG
(Haskell)
a239122 n = a239122_list !! (n-1)
a239122_list = scanl1 (+) a061019_list
(Python)
from functools import reduce
from operator import ixor
from sympy import factorint
def A239122(n): return sum(-i if reduce(ixor, factorint(i).values(), 0)&1 else i for i in range(1, n+1)) # Chai Wah Wu, Jan 03 2023
CROSSREFS
KEYWORD
sign
AUTHOR
Reinhard Zumkeller, Mar 10 2014
STATUS
approved