login

Nominations for sequence A400000 are open, see here.

A010555
a(n) = 1 if n is the product of an even number of distinct primes, otherwise a(n) = -1.
1
1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, 1, -1, -1, 1, 1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, 1, -1, -1, -1, 1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, -1
OFFSET
1,1
COMMENTS
The old definition was mobius(mobius(n)). The reason for this sequence was that in some ancient version of Maple the command "with(numtheory): A010555 := n->mobius(mobius(n));" worked. But it no longer works, so the definition has been changed.
LINKS
FORMULA
a(n) = (-1)^(1-A353629(n)). - Antti Karttunen, Jan 17 2025
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 6/Pi^2 - 1 = -0.392072... . - Amiram Eldar, Sep 17 2026
MATHEMATICA
a[n_] := If[MoebiusMu[n] == 1, 1, -1]; Array[a, 100] (* Amiram Eldar, Sep 17 2026 *)
PROG
(PARI) A010555(n) = if(1==moebius(n), 1, -1); \\ Antti Karttunen, Jan 17 2025
CROSSREFS
Cf. A008683, A030229 (positions of positive terms), A353629 (their characteristic function).
Sequence in context: A119664 A257075 A330034 * A108784 A127252 A244513
KEYWORD
sign,easy
EXTENSIONS
Definition changed by N. J. A. Sloane, Jan 15 2019
STATUS
approved