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”).

A359155
Dirichlet inverse of A359154, where A359154 is multiplicative with a(p^e) = (-1)^(p*e).
3
1, -1, 1, 0, 1, -1, 1, 0, 0, -1, 1, 0, 1, -1, 1, 0, 1, 0, 1, 0, 1, -1, 1, 0, 0, -1, 0, 0, 1, -1, 1, 0, 1, -1, 1, 0, 1, -1, 1, 0, 1, -1, 1, 0, 0, -1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, -1, 1, 0, 1, -1, 0, 0, 1, -1, 1, 0, 1, -1, 1, 0, 1, -1, 0, 0, 1, -1, 1, 0, 0, -1, 1, 0, 1, -1, 1, 0, 1, 0, 1, 0, 1, -1, 1, 0, 1, 0, 0, 0, 1, -1, 1, 0, 1
OFFSET
1
LINKS
FORMULA
Multiplicative with a(p) = (-1)^(1+p), and a(p^e) = 0 if e > 1.
a(n) = A008683(n) * A359154(n).
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A359154(n/d) * a(d).
For all n >= 1, a(A003961(n)) = A008966(n).
Dirichlet g.f.: (zeta(s)/zeta(2*s))*((2^s-1)/(2^s+1)). - Amiram Eldar, Dec 29 2022
MATHEMATICA
f[p_, e_] := If[e == 1, 1, 0]; f[2, e_] := If[e == 1, -1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 29 2022 *)
PROG
(PARI) A359155(n) = { my(f = factor(n)); prod(k=1, #f~, (1==f[k, 2])*((-1)^(1+f[k, 1]))); };
(PARI) A359155(n) = { my(f = factor(n)); moebius(n)*prod(k=1, #f~, (-1)^(f[k, 1]*f[k, 2])); };
(Python)
from functools import reduce
from operator import ixor
from sympy import factorint
def A359155(n): return 0 if max((f:=factorint(n)).values(), default=0) > 1 else -1 if reduce(ixor, (p&1^1 for p in f.keys()), 0) else 1 # Chai Wah Wu, Dec 21 2022
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Dec 19 2022
STATUS
approved