[go: up one dir, main page]

login
A359548
Dirichlet inverse of A053866, where A053866(n) gives the parity of sigma(n).
6
1, -1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1
OFFSET
1
LINKS
Jon Maiga, Computer-generated formulas for A359548, Sequence Machine.
FORMULA
Multiplicative with a(2^e) = -1 if e=1, a(2^e) = 0 if e > 1, and for odd primes p, a(p^e) = -1 if e=2, a(p^e) = 0 if e=1 or e>2.
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A053866(n/d) * a(d).
a(2^n) = A008683(2^n); a(2n+1) = A271102(2n+1).
From Antti Karttunen, Nov 24 2023: (Start)
a(n) = Sum_{d|n} A008683(n/d)*A323239(d).
a(n) = A359549(n) * A359818(n). [From Sequence Machine] (End)
MATHEMATICA
f[p_, e_] := If[(p == 2 && e == 1) || (p > 2 && e == 2), -1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 07 2023 *)
PROG
(PARI) A359548(n) = { my(f=factor(n)); prod(k=1, #f~, if(2==f[k, 1], -(1==f[k, 2]), -(2==f[k, 2]))); };
(Python)
from math import prod
from sympy import factorint
def A359548(n): return (0 if (m:=(~n & n-1).bit_length())>1 else (-1 if m==1 else 1))*prod(-1 if e==2 else 0 for e in factorint(n>>m).values()) # Chai Wah Wu, Jan 03 2024
CROSSREFS
Cf. A008683, A053866, A271102, A359549 (parity of terms, and also their absolute values), A359818.
Möbius transform of A323239.
Sequence in context: A205988 A167700 A010057 * A359549 A359773 A359774
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Jan 06 2023
STATUS
approved