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

%I #21 Dec 29 2022 06:31:10

%S 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,

%T 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,

%U 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

%N Dirichlet inverse of A359154, where A359154 is multiplicative with a(p^e) = (-1)^(p*e).

%H Antti Karttunen, <a href="/A359155/b359155.txt">Table of n, a(n) for n = 1..100000</a>

%F Multiplicative with a(p) = (-1)^(1+p), and a(p^e) = 0 if e > 1.

%F a(n) = A008683(n) * A359154(n).

%F a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A359154(n/d) * a(d).

%F For all n >= 1, a(A003961(n)) = A008966(n).

%F Dirichlet g.f.: (zeta(s)/zeta(2*s))*((2^s-1)/(2^s+1)). - _Amiram Eldar_, Dec 29 2022

%t 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 *)

%o (PARI) A359155(n) = { my(f = factor(n)); prod(k=1, #f~, (1==f[k,2])*((-1)^(1+f[k, 1]))); };

%o (PARI) A359155(n) = { my(f = factor(n)); moebius(n)*prod(k=1, #f~, (-1)^(f[k, 1]*f[k, 2])); };

%o (Python)

%o from functools import reduce

%o from operator import ixor

%o from sympy import factorint

%o 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

%Y Cf. A001414, A003961, A008683, A008966, A359154.

%K sign,mult

%O 1

%A _Antti Karttunen_, Dec 19 2022

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 June 12 19:14 EDT 2024. Contains 373360 sequences. (Running on oeis4.)