login
The smaller of a pair of consecutive composite squarefree numbers (A120944) without any prime number between them.
1

%I #12 Apr 12 2020 18:15:44

%S 14,21,33,34,38,55,57,62,65,69,74,77,85,86,91,93,94,105,110,114,115,

%T 118,119,122,129,133,141,142,143,145,154,158,159,165,174,177,182,183,

%U 185,186,187,194,201,202,203,205,206,209,213,214,215,217,218,219,221,230,235,237,246,247,253,254,258,259,265,266,273,285,286,287,290,295,298,299

%N The smaller of a pair of consecutive composite squarefree numbers (A120944) without any prime number between them.

%C Supersequence of A121495.

%e 62 is in the sequence because A120944(20)=62, A120944(21)=65, without primes between them.

%t Select[Partition[Select[Range[400],CompositeQ[#]&&SquareFreeQ[#]&],2,1], PrimePi[ #[[1]]]==PrimePi[#[[2]]]&][[All,1]] (* _Harvey P. Dale_, Apr 12 2020 *)

%o (PARI)

%o freesqrcomp(n)=issquarefree(n)&&!isprime(n)

%o nextfqc(n)={local(k); k=n+1; while(!freesqrcomp(k), k+=1); return(k)}

%o {for(i=2, 1000, if(freesqrcomp(i) && (nextfqc(i)<nextprime(i)), print1(i,", ")))}

%Y Cf. A120944, A240592.

%K nonn

%O 1,1

%A _Antonio Roldán_, Apr 08 2014