A359432 Dirichlet inverse of A327936, which is multiplicative sequence with a(p^e) = p if e >= p, otherwise 1.
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
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Crossrefs
Programs
-
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 *)
-
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
A327936(n/d)*A359432(d),0)); mapput(memoA359432,n,v); (v)));
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
Comments