OFFSET
1
COMMENTS
From Antti Karttunen, Dec 31 2022: (Start)
Note the correspondences between four sequences:
^ ^
| |
inv inv
| |
v v
Here inv means that the sequences are Dirichlet Inverses of each other, and abs means taking absolute values.
(End)
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..100000
FORMULA
a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, d<n} A166486(n/d) * a(d).
From Antti Karttunen, Dec 22, Dec 31 2022: (Start)
Multiplicative with a(2^e) = (-1)^e, and for odd primes p, a(p^e) = -1 if e = 1, otherwise 0.
For all e >= 0, a(2^e) = A008836(2^e).
For all n >= 0, a(2n+1) = A008683(2n+1).
(End)
Dirichlet g.f.: 4^s/((4^s-1)*zeta(s)). - Amiram Eldar, Dec 30 2022
MATHEMATICA
f[p_, e_] := If[e == 1, -1, 0]; f[2, e_] := (-1)^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 30 2022 *)
PROG
(PARI)
A166486(n) = !!(n%4);
memoA355689 = Map();
A355689(n) = if(1==n, 1, my(v); if(mapisdefined(memoA355689, n, &v), v, v = -sumdiv(n, d, if(d<n, A166486(n/d)*A355689(d), 0)); mapput(memoA355689, n, v); (v)));
(PARI) A355689(n) = { my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], (-1)^f[k, 2], -(1==f[k, 2]))); }; \\ Antti Karttunen, Dec 22 2022
CROSSREFS
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Jul 15 2022
STATUS
approved