%I #10 Oct 29 2021 02:21:12
%S 2,13,19,31,43,59,61,83,127,149,151,181,257,167,241,223,251,401,227,
%T 311,419,383,347,499,479,547,631,593,523,599,563,727,691,743,857,829,
%U 953,863,853,827,1093
%N a(n) is the least prime that can be written in exactly n ways as s+2*p where s is a semiprime and p is a prime, or 0 if no such prime exists.
%C a(41) > 10^5 if it is not 0.
%C Conjecture: First zeros of the sequence are a(41), a(666), a(1277), a(2701), ... - _Giorgos Kalogeropoulos_, Sep 23 2021
%e a(3) = 31 because the prime 31 can be obtained in exactly 3 ways:
%e 31 = 9+2*11 = 21+2*5 = 25+2*3
%e and this is the least such prime.
%p N:= 10000: # to search values up to N
%p P:= select(isprime, [2,seq(i,i=3..N,2)]):
%p S:= select(t -> numtheory:-bigomega(t)=2, [$1..N]):
%p V:= Vector(N):
%p for p in P do
%p for s in S do
%p r:= s+2*p;
%p if r > N then break fi;
%p V[r]:= V[r]+1
%p od
%p od:
%p m:= min({$0..max(V[P])} minus convert(V[P],set))-1:
%p M:= Array(0..m):
%p for p in P do
%p v:= V[p];
%p if v <= m and M[v] = 0 then M[v]:= p fi
%p od:
%p convert(M,list);
%t Table[k=2;While[Length@Select[k-2Prime@Range@PrimePi@Floor[k/2],PrimeOmega@#==2&]!=n,k=NextPrime@k];k,{n,0,40}] (* _Giorgos Kalogeropoulos_, Sep 23 2021 *)
%K nonn,more
%O 0,1
%A _J. M. Bergot_ and _Robert Israel_, Aug 24 2021