login
A254923
The slowest increasing sequence of semiprimes with alternating parity.
4
4, 9, 10, 15, 22, 25, 26, 33, 34, 35, 38, 39, 46, 49, 58, 65, 74, 77, 82, 85, 86, 87, 94, 95, 106, 111, 118, 119, 122, 123, 134, 141, 142, 143, 146, 155, 158, 159, 166, 169, 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
OFFSET
1,1
COMMENTS
a(n) is the least semiprime > a(n-1) such that (a(n) mod 2) != (a(n-1) mod 2).
LINKS
EXAMPLE
The sequence starts with 4, which is even.
The next semiprime is 6, but that's also even, so 6 is skipped over and the sequence continues with 9, which is odd.
The next semiprime is 10, and since that's even, it's the next term in the sequence.
MAPLE
R:= 4: x:= 3: count:= 1:
while count < 100 do
x:= x+2;
if numtheory:-bigomega(x) = 2 then
count:= count+1; R:= R, x; x:= x-1
fi
od:
R; # Robert Israel, Aug 04 2023
MATHEMATICA
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 *)
PROG
(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
(Sage)
A=[4]
for x in [2..314]:
if x % 2 != A[-1] % 2 and is_prime(x//prime_divisors(x)[0]):
A.append(x) # Tom Edgar, Feb 12 2015
CROSSREFS
Cf. A001358.
Sequence in context: A139558 A219556 A110602 * A122635 A191912 A191911
KEYWORD
nonn
AUTHOR
Zak Seidov, Feb 10 2015
STATUS
approved