The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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 (list; graph; refs; listen; history; text; internal format)
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
Sequence in context: A008966 A080323 A157657 * A069158 A353559 A253206
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Dec 19 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 05:56 EDT 2024. Contains 372549 sequences. (Running on oeis4.)