This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A302047 #17 Dec 13 2021 15:46:24 %S A302047 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 A302047 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 A302047 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 A302047 a(n) = 1 if n = prime(k)*prime(2+k) for some k, otherwise 0. %C A302047 Characteristic function for prime(n)*prime(n+2) (A090076). %H A302047 Antti Karttunen, <a href="/A302047/b302047.txt">Table of n, a(n) for n = 1..66013</a> %H A302047 <a href="/index/Ch#char_fns">Index entries for characteristic functions</a> %H A302047 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a> %F A302047 a(n) = A185015(A246277(n)). %t A302047 Array[Boole@ And[Length@ # == 2, Max@ #[[All, -1]] == 1, Subtract @@ PrimePi[#[[All, 1]]] == -2 ] &@ FactorInteger@ # &, 120] (* or *) %t A302047 With[{s = Array[Prime[#] Prime[# + 2] &, 5]}, ReplacePart[ConstantArray[0, Max@ s], Map[# -> 1 &, s] ] ] (* _Michael De Vlieger_, Apr 27 2018 *) %t A302047 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 A302047 (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 A302047 Cf. A090076, A246277, A280710, A302048, A302049. %K A302047 nonn %O A302047 1,1 %A A302047 _Antti Karttunen_, Apr 24 2018