login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A076544
mu(n)+sqf(n): mu(n) is Moebius function; sqf(n)=1 if n is squarefree, sqf(n)=-1 otherwise.
1
2, 0, 0, -1, 0, 2, 0, -1, -1, 2, 0, -1, 0, 2, 2, -1, 0, -1, 0, -1, 2, 2, 0, -1, -1, 2, -1, -1, 0, 0, 0, -1, 2, 2, 2, -1, 0, 2, 2, -1, 0, 0, 0, -1, -1, 2, 0, -1, -1, -1, 2, -1, 0, -1, 2, -1, 2, 2, 0, -1, 0, 2, -1, -1, 2, 0, 0, -1, 2, 0, 0, -1, 0, 2, -1, -1, 2, 0, 0, -1, -1, 2, 0, -1, 2, 2, 2, -1, 0, -1, 2, -1, 2, 2, 2, -1, 0, -1, -1, -1
OFFSET
1,1
FORMULA
a(n) = mu(n) + -1^(1+abs(mu(n))), where mu(n) = A008683(n). - Antti Karttunen, Jul 26 2017
MATHEMATICA
ms[n_]:=MoebiusMu[n]+If[SquareFreeQ[n], 1, -1]; Array[ms, 100] (* Harvey P. Dale, Feb 22 2013 *)
PROG
(Scheme) (define (A076544 n) (+ (A008683 n) (expt -1 (+ 1 (abs (A008683 n)))))) ;; Antti Karttunen, Jul 26 2017
CROSSREFS
Absolute values give A007423.
Cf. A008683.
Sequence in context: A321445 A353459 A007423 * A349912 A345079 A307377
KEYWORD
easy,sign
AUTHOR
Zak Seidov, Oct 19 2002
STATUS
approved