login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A359432
Dirichlet inverse of A327936, which is multiplicative sequence with a(p^e) = p if e >= p, otherwise 1.
4
1, -1, -1, -1, -1, 1, -1, 1, 0, 1, -1, 1, -1, 1, 1, 1, -1, 0, -1, 1, 1, 1, -1, -1, 0, 1, -2, 1, -1, -1, -1, -1, 1, 1, 1, 0, -1, 1, 1, -1, -1, -1, -1, 1, 0, 1, -1, -1, 0, 0, 1, 1, -1, 2, 1, -1, 1, 1, -1, -1, -1, 1, 0, -1, 1, -1, -1, 1, 1, -1, -1, 0, -1, 1, 0, 1, 1, -1, -1, -1, 2, 1, -1, -1, 1, 1, 1, -1, -1, 0, 1, 1, 1, 1, 1, 1, -1, 0, 0, 0, -1, -1, -1, -1, -1, 1, -1, 2
OFFSET
1,27
COMMENTS
Multiplicative because A327936 is.
LINKS
FORMULA
Multiplicative with a(p^e) = (1 - p)^(e/p) if p | e, -(1 - p)^((e - 1)/p) if e == 1 (mod p), and 0 otherwise. - Amiram Eldar, Jan 26 2023
MATHEMATICA
f[p_, e_] := Switch[Mod[e, p], 0, (1 - p)^(e/p), 1, -(1 - p)^((e - 1)/p), _, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Table[a[n], {n, 1, 100}] (* Amiram Eldar, Jan 26 2023 *)
PROG
(PARI)
A327936(n) = { my(f = factor(n)); for(k=1, #f~, f[k, 2] = (f[k, 2]>=f[k, 1])); factorback(f); };
memoA359432 = Map();
A359432(n) = if(1==n, 1, my(v); if(mapisdefined(memoA359432, n, &v), v, v = -sumdiv(n, d, if(d<n, A327936(n/d)*A359432(d), 0)); mapput(memoA359432, n, v); (v)));
CROSSREFS
Cf. A327936.
Cf. A038838 (positions of even terms), A122132 (of odd terms), A353627 (parity of terms).
Cf. also A358216, A359433.
Sequence in context: A268643 A005094 A121372 * A338639 A249351 A123706
KEYWORD
sign,mult
AUTHOR
Antti Karttunen, Jan 02 2023
STATUS
approved