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.
%I A061019 #50 Nov 26 2024 17:14:03 %S A061019 1,-2,-3,4,-5,6,-7,-8,9,10,-11,-12,-13,14,15,16,-17,-18,-19,-20,21,22, %T A061019 -23,24,25,26,-27,-28,-29,-30,-31,-32,33,34,35,36,-37,38,39,40,-41, %U A061019 -42,-43,-44,-45,46,-47,-48,49,-50,51,-52,-53,54,55,56,57,58,-59,60,-61,62,-63,64,65,-66,-67,-68,69,-70 %N A061019 Negate primes in factorization of n. %C A061019 Inverse Moebius transform of A158523. - Corrected by _Antti Karttunen_, Nov 26 2024 %H A061019 Antti Karttunen, <a href="/A061019/b061019.txt">Table of n, a(n) for n = 1..20000</a> %F A061019 a(n) = n*lambda(n), where lambda is Liouville's function: A008836. %F A061019 a(n) = (-1)^(number of primes dividing n)*n = n * (-1)^A001222(n) = n*A008836(n). %F A061019 Totally multiplicative with a(p) = -p for prime p. [_Jaroslav Krizek_, Nov 01 2009] %F A061019 Dirichlet g.f.: zeta(2*s-2)/zeta(s-1). Dirichlet inverse of A055615, all terms turned positive there. - _R. J. Mathar_, Apr 16 2011 %F A061019 a(n) = Sum_{d|n} lambda(d)*psi(d) = sum_{d|n} A008836(d)* A001615(d) = n/lambda(n). - _Enrique Pérez Herrero_, Sep 18 2012 %e A061019 a(6) = (-2)(-3) = +6, while a(8) = (-2)^3 = -8. %t A061019 Table[n (-1)^PrimeOmega[n],{n,70}] (* _Harvey P. Dale_, Oct 05 2011 *) %o A061019 (Haskell) %o A061019 a061019 1 = 1 %o A061019 a061019 n = product $ map negate $ a027746_row n %o A061019 -- _Reinhard Zumkeller_, Feb 08 2012 %o A061019 (PARI) a(n) = if( bitand(bigomega(n),1), - n, n ); /* _Joerg Arndt_, Sep 19 2012 */ %o A061019 (Python) %o A061019 from functools import reduce %o A061019 from operator import ixor %o A061019 from sympy import factorint %o A061019 def A061019(n): return -n if reduce(ixor, factorint(n).values(),0)&1 else n # _Chai Wah Wu_, Dec 20 2022 %Y A061019 Cf. A000027, A001222, A061020, A001615, A158523 (Möbius transform). %Y A061019 Cf. A027746. %Y A061019 Cf. A239122 (partial sums). %K A061019 easy,nice,sign,mult %O A061019 1,2 %A A061019 _Marc LeBrun_, Apr 13 2001