login
A359552
Multiplicative with a(p^e) = 1 if e == 0 mod p, otherwise 0.
2
1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
OFFSET
1
FORMULA
a(n) = [A342014(n) == 0] = [A003415(n) == 0 mod n], where [ ] is the Iverson bracket.
MATHEMATICA
f[p_, e_] := If[Divisible[e, p], 1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 06 2023 *)
PROG
(PARI) A359552(n) = { my(f=factor(n)); prod(i=1, #f~, !(f[i, 2]%f[i, 1])); };
(PARI)
A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
A359552(n) = !(A003415(n)%n);
(Python)
from sympy import factorint
def A359552(n): return int(any(map(lambda d:d[1]%d[0], factorint(n).items())))^1 # Chai Wah Wu, Jan 06 2023
CROSSREFS
Characteristic function of A072873.
Sequence in context: A185114 A154281 A154282 * A224877 A178600 A373977
KEYWORD
nonn,mult
AUTHOR
Antti Karttunen, Jan 06 2023
STATUS
approved