OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 31 because the 5th semiprime is 14 and the first 5 primes after 14 are 17, 19, 23, 29, 31.
MAPLE
N:= 1000: # for terms <= N
P:= select(isprime, [2, seq(i, i=3..N, 2)]): nP:= nops(P):
S:= select(t -> numtheory:-bigomega(t)=2, [$1..N]):
f:= proc(n) local j;
j:= ListTools:-BinaryPlace(P, S[n]);
if j + n <= nP then P[j+n] else fail fi
end proc:
R:= NULL:
for i from 1 do
v:= f(i);
if v = fail then break fi;
R:= R, v
od:
R;
MATHEMATICA
sp=Select[Range[200], PrimeOmega[#]==2&]; Table[NextPrime[sp[[n]], n], {n, 62}] (* James C. McMahon, Jul 07 2024 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov and Robert Israel, Jun 14 2024
STATUS
approved