%I #27 Dec 27 2023 19:31:23
%S 6,35,38,39,46,51,55,57,58,65,69,74,77,82,85,86,87,91,93,94,95,106,
%T 111,115,118,119,122,123,133,134,141,142,143,145,146,155,158,159,161,
%U 166,177,178,183,185,187,194,201,202,203,205,206,209,213,214,215,217,218,219,221,226,235,237,247,249
%N a(n) is the least squarefree semiprime > a(n-1) and coprime to a(n-1), with a(1) = 6.
%H Robert Israel, <a href="/A362306/b362306.txt">Table of n, a(n) for n = 1..10000</a>
%e a(2) = 35 because 35 = 5*7 is the least squarefree semiprime greater than and coprime to a(1) = 6.
%p A[1]:= 6: t:= 6: count:= 1:
%p for x from 7 while count < 100 do
%p if igcd(x,t) = 1 then
%p F:= ifactors(x)[2];
%p if nops(F) = 2 and F[..,2] = [1,1] then
%p count:= count+1;
%p A[count]:= x;
%p t:= x;
%p fi
%p fi
%p od:
%p seq(A[i],i=1..100);
%t s={m1=6};Do[If[ 2 == PrimeOmega[m] && SquareFreeQ[m] && CoprimeQ[m1,m], AppendTo[s, m1 = m]], {m, 7, 1000}]; s
%t lss[n_]:=Module[{k=n+1},While[!SquareFreeQ[k]||PrimeOmega[k]!=2||!CoprimeQ[n,k],k++];k]; NestList[lss,6,70] (* _Harvey P. Dale_, Dec 27 2023 *)
%Y Cf. A001222, A001358, A006881.
%K nonn
%O 1,1
%A _Zak Seidov_ and _Robert Israel_, Apr 17 2023