%I #35 Jan 06 2023 15:16:35
%S 0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,
%T 0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1,
%U 0,0,0,1,0,0,0,1,0,0,0,1,1,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1
%N a(n) = 1 if there is a prime p such that p^p divides n, otherwise 0.
%H Antti Karttunen, <a href="/A342023/b342023.txt">Table of n, a(n) for n = 1..65537</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>.
%F a(n) = min(1, A129251(n)) = [A129251(n) > 0], where [ ] is the Iverson bracket.
%F a(n) = [A342007(n) > 1] = [A327936(n) > 1].
%F For all n >= 1,
%F a(n) <= A107078(n), i.e., a(n) = 1 => A107078(n) = 1.
%F a(n) <= A342024(n), i.e., a(n) = 1 => A342024(n) = 1.
%F a(n) <= A341999(n), i.e., a(n) = 1 => A341999(n) = 1.
%F A342004
%F For all n >= 2, a(A003415(n)) = A341996(n).
%F For all n >= 0, a(A276086(n)) = 0.
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1 - Product_{p prime} (1 - 1/p^p) = 0.2780097655... . - _Amiram Eldar_, Jul 24 2022
%F a(n) = 1 - A359550(n) = A341999(n) - A359546(n). - _Antti Karttunen_, Jan 06 2023
%t Array[Function[{D, q}, Boole[Total@ Table[Count[D, _?(IntegerExponent[#, p] == p &)], {p, Prime@ Range@ q}] > 0]] @@ {Divisors[#], PrimePi@ Floor[Sqrt[#]]} &, 120] (* _Michael De Vlieger_, Mar 11 2021 *)
%o (PARI) A342023(n) = if(1==n,0,my(f = factor(n)); for(k=1, #f~, if(f[k, 2]>=f[k, 1], return(1))); (0));
%o (Python)
%o from sympy import factorint
%o def A342023(n):
%o f = factorint(n)
%o for p in f:
%o if p <= f[p]:
%o return 1
%o return 0 # _Chai Wah Wu_, Mar 09 2021
%Y Characteristic function of A100716.
%Y Cf. A003415, A008966, A048103 (positions of zeros), A107078, A276086, A341996, A341999, A327936, A341999, A342004, A342007, A359546, A359550 (one's complement).
%Y Differs from A129251 and A276077 for the first time at n=108, as here a(108) = 1.
%Y Differs from A342024 for the first time at n=625, where a(625)=0, while A342024(625)=1.
%K nonn
%O 1
%A _Antti Karttunen_, Mar 09 2021