Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #13 Jan 06 2023 14:15:42
%S 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,
%T 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,
%U 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
%N Multiplicative with a(p^e) = 1 if e == 0 mod p, otherwise 0.
%H Antti Karttunen, <a href="/A359552/b359552.txt">Table of n, a(n) for n = 1..110592</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F a(n) = [A342014(n) == 0] = [A003415(n) == 0 mod n], where [ ] is the Iverson bracket.
%t 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 *)
%o (PARI) A359552(n) = { my(f=factor(n)); prod(i=1, #f~, !(f[i, 2]%f[i, 1])); };
%o (PARI)
%o A003415(n) = if(n<=1, 0, my(f=factor(n)); n*sum(i=1, #f~, f[i, 2]/f[i, 1]));
%o A359552(n) = !(A003415(n)%n);
%o (Python)
%o from sympy import factorint
%o def A359552(n): return int(any(map(lambda d:d[1]%d[0],factorint(n).items())))^1 # _Chai Wah Wu_, Jan 06 2023
%Y Characteristic function of A072873.
%Y Cf. A003415, A342014, A359551.
%K nonn,mult
%O 1
%A _Antti Karttunen_, Jan 06 2023