cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A239122 Partial sums of A061019.

Original entry on oeis.org

1, -1, -4, 0, -5, 1, -6, -14, -5, 5, -6, -18, -31, -17, -2, 14, -3, -21, -40, -60, -39, -17, -40, -16, 9, 35, 8, -20, -49, -79, -110, -142, -109, -75, -40, -4, -41, -3, 36, 76, 35, -7, -50, -94, -139, -93, -140, -188, -139, -189, -138, -190, -243, -189, -134
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 10 2014

Keywords

Crossrefs

Cf. A002819.

Programs

  • Haskell
    a239122 n = a239122_list !! (n-1)
    a239122_list = scanl1 (+) a061019_list
    
  • Mathematica
    Accumulate[Table[n*(-1)^PrimeOmega[n],{n,70}]] (* Harvey P. Dale, Apr 02 2015 *)
  • 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