VOOZH about

URL: https://oeis.org/A359154

⇱ A359154 - OEIS


login
A359154
a(n) = (-1)^sopfr(n), where sopfr is the sum of prime factors with repetition.
3
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, -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
LINKS
FORMULA
Multiplicative with a(p^e) = (-1)^(p*e). Fully multiplicative with a(p) = (-1)^p.
a(n) = (-1)^A001414(n) = (-1)^(1+A356163(n)).
For all n >= 1, a(A003961(n)) = A008836(n).
Dirichlet g.f.: (zeta(2*s)/zeta(s))*((2^s+1)/(2^s-1)). - Amiram Eldar, Dec 29 2022
MATHEMATICA
f[p_, e_] := (-1)^(p*e); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 29 2022 *)
PROG
(PARI)
A001414(n) = ((n=factor(n))[, 1]~*n[, 2]); \\ From A001414.
A359154(n) = ((-1)^(A001414(n)));
(PARI) A359154(n) = { my(f = factor(n)); prod(k=1, #f~, (-1)^(f[k, 1]*f[k, 2])); };
(Python)
from functools import reduce
from operator import ixor, and_
from itertools import starmap
from sympy import factorint
def A359154(n): return -1 if reduce(ixor, starmap(and_, factorint(n).items()), 0)&1 else 1 # Chai Wah Wu, Dec 21 2022
CROSSREFS
Cf. A001414, A003961, A008836, A356163, A359155 (Dirichlet inverse).
Sequence in context: A162285 A186035 A358766 * A359166 A359581 A359792
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Dec 19 2022
STATUS
approved