OFFSET
1,1
EXAMPLE
a(3) = 262 because 262 = 2 * 131 is a semiprime, the previous semiprime is 262 - 3 = 259 = 7 * 37, the next semiprime is 262 + 3 = 265 = 5 * 53, and no semiprime less than 262 works.
MAPLE
N:= 46: # for a(1) .. a(N)
V:= Vector(N):
b:= 6: d:= 2: count:= 0:
for i from 7 while count < N do
if numtheory:-bigomega(i) = 2 then
ib:= i-b;
if ib = d and ib <= N then
if V[d] = 0 then V[d]:= b; count:= count+1 fi
else d:= ib
fi;
b:= i;
fi;
od:
convert(V, list);
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov and Robert Israel, Aug 26 2023
STATUS
approved