login
a(n) is the n-th prime after the n-th semiprime.
1

%I #29 Jul 07 2024 20:52:47

%S 5,11,17,19,31,37,47,53,61,67,79,83,89,101,103,113,131,137,149,151,

%T 157,173,179,191,199,211,227,233,239,241,257,263,269,271,293,313,331,

%U 337,347,349,353,359,373,383,389,409,419,421,431,433,449,461,463,467,487,499,509,521,547,557,563,577

%N a(n) is the n-th prime after the n-th semiprime.

%H Robert Israel, <a href="/A373656/b373656.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A000040(n + A000720(A001358(n))).

%e a(5) = 31 because the 5th semiprime is 14 and the first 5 primes after 14 are 17, 19, 23, 29, 31.

%p N:= 1000: # for terms <= N

%p P:= select(isprime, [2, seq(i, i=3..N, 2)]): nP:= nops(P):

%p S:= select(t -> numtheory:-bigomega(t)=2, [$1..N]):

%p f:= proc(n) local j;

%p j:= ListTools:-BinaryPlace(P, S[n]);

%p if j + n <= nP then P[j+n] else fail fi

%p end proc:

%p R:= NULL:

%p for i from 1 do

%p v:= f(i);

%p if v = fail then break fi;

%p R:= R, v

%p od:

%p R;

%t sp=Select[Range[200],PrimeOmega[#]==2&];Table[NextPrime[sp[[n]],n],{n,62}] (* _James C. McMahon_, Jul 07 2024 *)

%Y Cf. A000040, A000720, A001358, A373630.

%K nonn

%O 1,1

%A _Zak Seidov_ and _Robert Israel_, Jun 14 2024