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
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, 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, -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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1
LINKS
FORMULA
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A035263(n/d) * a(d).
Multiplicative with a(2^e) = -1 if e = 2, 0 otherwise, and for odd primes, a(p^e) = -1 if e = 1, 0 otherwise.
a(2n+1) = A008683(2n+1).
MATHEMATICA
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 *)
PROG
(PARI) A359591(n) = { my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], -(2==f[k, 2]), -(1==f[k, 2]))); };
(PARI)
A035263(n) = (valuation(2*n, 2)%2);
memoA359591 = Map();
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)));
(Python)
from math import prod
from sympy import mobius, factorint
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
CROSSREFS
Cf. A008683, A035263, A359592 (parity of terms, also their absolute values).
Sequence in context: A373993 A322980 A267053 * A359592 A257477 A259024
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Jan 09 2023
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 July 9 05:32 EDT 2024. Contains 374171 sequences. (Running on oeis4.)