login
Numbers n such that n and n+4 are consecutive semiprimes.
4

%I #22 Sep 19 2020 13:56:34

%S 10,51,58,65,87,111,129,209,249,274,291,305,335,377,382,403,407,447,

%T 454,485,489,493,497,529,538,629,681,699,713,749,767,781,785,803,831,

%U 889,901,917,939,951,961,985,989,1007,1037,1073,1115,1191,1207

%N Numbers n such that n and n+4 are consecutive semiprimes.

%C Note that a(1)=10=A131109(k=4).

%C Subsequence of A175648: a(1)=10=A175648(2), a(2)=51=A175648(7), a(3)=58=A175648(8), etc. - _Zak Seidov_, Dec 20 2017

%H Charles R Greathouse IV, <a href="/A264044/b264044.txt">Table of n, a(n) for n = 1..10000</a>

%e 10=A001358(4) and 14=A001358(5).

%p B:= select(numtheory:-bigomega=2, [$1..2000]):

%p B[select(t ->B[t+1]-B[t]=4, [$1..nops(B)-1])]; # _Robert Israel_, Dec 21 2017

%t Select[Partition[Select[Range[1250], PrimeOmega@ # == 2 &], 2, 1], Differences@ # == {4} &][[All, 1]] (* _Michael De Vlieger_, Dec 20 2017 *)

%t SequencePosition[Table[If[PrimeOmega[n]==2,1,0],{n,1300}],{1,0,0,0,1}][[All,1]] (* Requires Mathematica version 10 or later *) (* _Harvey P. Dale_, Sep 19 2020 *)

%o (PARI) is(n)=bigomega(n)==2 && bigomega(n+4)==2 && bigomega(n+1)!=2 && bigomega(n+2)!=2 && bigomega(n+3)!=2 \\ _Charles R Greathouse IV_, Nov 02 2015

%Y Cf. A001358, A065516, A123375, A131109, A136196, A175648, A264043.

%K nonn

%O 1,1

%A _Zak Seidov_, Nov 02 2015