|
|
A359548
|
|
Dirichlet inverse of A053866, where A053866(n) gives the parity of sigma(n).
|
|
5
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1
|
|
LINKS
|
|
|
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).
|
|
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
|
|
|
KEYWORD
|
sign,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|