%I #17 Dec 13 2021 15:46:24
%S 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,
%T 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,
%U 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
%N a(n) = 1 if n = prime(k)*prime(2+k) for some k, otherwise 0.
%C Characteristic function for prime(n)*prime(n+2) (A090076).
%H Antti Karttunen, <a href="/A302047/b302047.txt">Table of n, a(n) for n = 1..66013</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) = A185015(A246277(n)).
%t Array[Boole@ And[Length@ # == 2, Max@ #[[All, -1]] == 1, Subtract @@ PrimePi[#[[All, 1]]] == -2 ] &@ FactorInteger@ # &, 120] (* or *)
%t With[{s = Array[Prime[#] Prime[# + 2] &, 5]}, ReplacePart[ConstantArray[0, Max@ s], Map[# -> 1 &, s] ] ] (* _Michael De Vlieger_, Apr 27 2018 *)
%t Module[{pp2=Table[Prime[n]Prime[n+2],{n,5}],nn},nn=Max[pp2];Table[ If[ MemberQ[ pp2,k],1,0],{k,nn}]] (* _Harvey P. Dale_, Dec 13 2021 *)
%o (PARI) A302047(n) = if((2!=bigomega(n))||(2!=omega(n)),0,my(f=factor(n)); (f[2,1] == nextprime(1+nextprime(1+f[1,1]))));
%Y Cf. A090076, A246277, A280710, A302048, A302049.
%K nonn
%O 1,1
%A _Antti Karttunen_, Apr 24 2018