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!)
A359591 Dirichlet inverse of A035263, where A035263(n) is parity of 2-adic valuation of 2n. 2

%I #19 Jan 26 2023 04:12:19

%S 1,0,-1,-1,-1,0,-1,0,0,0,-1,1,-1,0,1,0,-1,0,-1,1,1,0,-1,0,0,0,0,1,-1,

%T 0,-1,0,1,0,1,0,-1,0,1,0,-1,0,-1,1,0,0,-1,0,0,0,1,1,-1,0,1,0,1,0,-1,

%U -1,-1,0,0,0,1,0,-1,1,1,0,-1,0,-1,0,0,1,1,0,-1,0,0,0,-1,-1,1,0,1,0,-1,0,1,1,1,0,1,0,-1,0,0,0,-1,0,-1,0,-1,0,-1,0

%N Dirichlet inverse of A035263, where A035263(n) is parity of 2-adic valuation of 2n.

%H Antti Karttunen, <a href="/A359591/b359591.txt">Table of n, a(n) for n = 1..65537</a>

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

%F Multiplicative with a(2^e) = -1 if e = 2, 0 otherwise, and for odd primes, a(p^e) = -1 if e = 1, 0 otherwise.

%F a(2n+1) = A008683(2n+1).

%t f[p_, e_] := If[e == 1, -1, 0]; f[2, e_] := If[e == 2, -1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Jan 26 2023 *)

%o (PARI) A359591(n) = { my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1],-(2==f[k, 2]),-(1==f[k, 2]))); };

%o (PARI)

%o A035263(n) = (valuation(2*n,2)%2);

%o memoA359591 = Map();

%o A359591(n) = if(1==n,1,my(v); if(mapisdefined(memoA359591,n,&v), v, v = -sumdiv(n,d,if(d<n,A035263(n/d)*A359591(d),0)); mapput(memoA359591,n,v); (v)));

%o (Python)

%o from math import prod

%o from sympy import mobius, factorint

%o def A359591(n): return mobius(n) if n&1 else (0 if (m:=n>>1)&1 else prod(-int(e==1) for e in factorint(m).values())) # _Chai Wah Wu_, Jan 10 2023

%Y Cf. A008683, A035263, A359592 (parity of terms, also their absolute values).

%K sign,mult

%O 1

%A _Antti Karttunen_, Jan 09 2023

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 September 8 18:41 EDT 2024. Contains 375753 sequences. (Running on oeis4.)