%I #18 Jul 29 2022 09:53:00
%S 1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
%T 0,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
%U 1,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1
%N a(n) = 1 if n is odd and not divisible by two consecutive prime numbers, otherwise 0.
%C a(n) = 1 if n is odd and relatively prime to A003961(n), otherwise 0.
%C a(n) = 1 if n and the smallest positive k such that n divides k*A003961(k) are coprime, otherwise 0.
%H Antti Karttunen, <a href="/A356172/b356172.txt">Table of n, a(n) for n = 1..65537</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F a(n) = A000035(n) * A356173(n).
%F a(n) = [gcd(n, A356164(n)) == 1], where [ ] is the Iverson bracket.
%F a(n) = [A356166(n) == 1] = [A356169(n) == 0].
%o (PARI)
%o A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
%o A356172(n) = ((n%2)&&(1==gcd(n, A003961(n))));
%o (PARI)
%o \\ Alternatively (slow!):
%o A356172(n) = for(k=1, oo, if((k*A003961(k))%n==0, return(1==gcd(n,k))));
%Y Characteristic function of A356171.
%Y Cf. A000035, A003961, A322361, A356164, A356166, A356169, A356173.
%K nonn
%O 1
%A _Antti Karttunen_, Jul 28 2022
|