%I #22 Aug 04 2023 15:47:47
%S 4,9,10,15,22,25,26,33,34,35,38,39,46,49,58,65,74,77,82,85,86,87,94,
%T 95,106,111,118,119,122,123,134,141,142,143,146,155,158,159,166,169,
%U 178,183,194,201,202,203,206,209,214,215,218,219,226,235,254,259,262,265,274,287,298,299,302,303,314
%N The slowest increasing sequence of semiprimes with alternating parity.
%C a(n) is the least semiprime > a(n-1) such that (a(n) mod 2) != (a(n-1) mod 2).
%H Robert Israel, <a href="/A254923/b254923.txt">Table of n, a(n) for n = 1..10000</a>
%e The sequence starts with 4, which is even.
%e The next semiprime is 6, but that's also even, so 6 is skipped over and the sequence continues with 9, which is odd.
%e The next semiprime is 10, and since that's even, it's the next term in the sequence.
%p R:= 4: x:= 3: count:= 1:
%p while count < 100 do
%p x:= x+2;
%p if numtheory:-bigomega(x) = 2 then
%p count:= count+1; R:= R,x; x:= x-1
%p fi
%p od:
%p R; # _Robert Israel_, Aug 04 2023
%t s={4};a=4;Do[a=a+1;While[PrimeOmega[a]!=2,a=a+2];AppendTo[s,a],{100}];s (* _Zak Seidov_, Feb 12 2015 *)
%o (PARI)s=[4];a=4;for(k=1,100,a=a+1;while(2<>bigomega(a),a=a+2);s=concat(s,a));s \\ _Zak Seidov_, Feb 12 2015
%o (Sage)
%o A=[4]
%o for x in [2..314]:
%o if x % 2 != A[-1] % 2 and is_prime(x//prime_divisors(x)[0]):
%o A.append(x) # _Tom Edgar_, Feb 12 2015
%Y Cf. A001358.
%K nonn
%O 1,1
%A _Zak Seidov_, Feb 10 2015