%I #22 Oct 13 2022 15:17:29
%S 10,15,51,58,65,87,111,123,129,146,209,226,237,249,274,278,291,305,
%T 335,346,365,371,377,382,403,407,427,447,454,485,489,493,497,505,529,
%U 538,545,573,591,597,629,635,649,681,699,707,713,749,767,781,785,803,807,831,843,889,901
%N Lesser of two consecutive semiprimes whose difference is also semiprime.
%H Harvey P. Dale, <a href="/A272307/b272307.txt">Table of n, a(n) for n = 1..2000</a>
%e 65 is in the sequence because 65 = 5*13, the next semiprime is 69 = 3*23, and 69-65 = 4 = 2*2, is also semiprime.
%t s[n_] := PrimeOmega@n==2; L=Select[Range@910, s]; Pick[ Most@L, s /@ Differences@ L] (* _Giovanni Resta_, Apr 25 2016 *)
%t Select[Partition[Select[Range[1000],PrimeOmega[#]==2&],2,1],PrimeOmega[#[[2]]-#[[1]]]==2&][[All,1]] (* _Harvey P. Dale_, Oct 13 2022 *)
%o (PARI)
%o proxsem(n)=local(p,s,r);s=0;p=n;while(s==0,p+=1;if(bigomega(p)==2,s=1;r=p));p
%o {for(i=1,1000,if(bigomega(i)==2,a=proxsem(i);if(bigomega(a-i)==2,print1(i,", "))))}
%Y Cf. A001358, A272306, A272308, A272309.
%K nonn
%O 1,1
%A _Antonio Roldán_, Apr 25 2016
|