%I #14 Jan 17 2025 09:11:34
%S 1,0,0,1,0,0,0,1,1,0,0,1,0,0,1,0,0,0,0,1,1,0,0,1,1,0,0,1,0,0,0,0,1,0,
%T 1,0,0,0,1,1,0,0,0,1,0,0,0,0,1,0,1,1,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0,1,
%U 1,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,0,1,1,0,0,1,1,1,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,1,0,0,1,0,1
%N Characteristic function for primitive elements of A235992.
%C a(n) = 1 if A003415(n), the arithmetic derivative of n, is even, but for all divisors d|n, 1<d<n, A358680(d)*A358680(n/d) = 0. Otherwise a(n) = 0.
%H Antti Karttunen, <a href="/A359828/b359828.txt">Table of n, a(n) for n = 1..100000</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F a(n) = A358680(n) * [0 == Sum_{d|n, 1<d<n} A358680(d)*A358680(n/d)], where [ ] is the Iverson bracket.
%o (PARI)
%o A358680(n) = if(n<=1, 1, my(f=factor(n)); 0==((n*sum(i=1, #f~, f[i, 2]/f[i, 1]))%2));
%o A359828(n) = if(!A358680(n), 0, fordiv(n,d,if((d>1)&&(d<n)&&A358680(d)&&A358680(n/d),return(0))); (1));
%Y Characteristic function of A359829.
%Y Cf. A003415, A235992, A358680, A359831.
%K nonn
%O 1
%A _Antti Karttunen_, Jan 17 2023