login
Numbers that can be written as p*q+r where p,q,r are primes (not necessarily distinct) such that p+q+r is prime.
2

%I #26 Feb 09 2022 08:28:10

%S 7,8,11,14,16,17,18,20,22,23,24,26,28,32,34,36,38,40,41,42,44,46,47,

%T 50,52,54,56,58,62,64,66,68,70,71,72,74,76,78,80,82,83,84,86,88,90,92,

%U 94,96,98,100,101,102,104,106,107,108,110,112,113,114,116,118,120,122,124,126,128,130,131,132

%N Numbers that can be written as p*q+r where p,q,r are primes (not necessarily distinct) such that p+q+r is prime.

%C Conjecture: the sequence contains all even positive integers except 2, 4, 6, 10, 12, 30, 48, 60.

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

%e a(4) = 14 is a term because 14 = 3*3+5 where 3+3+5 = 11 is prime.

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

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

%p PS:= convert(P,set):

%p nP:= nops(P):

%p S:= {}:

%p for i from 1 to nP do

%p for j from i to nP while P[i]*P[j] < N do

%p S:= S union select(`<=`,map(`+`,PS intersect map(`-`,PS,P[i]+P[j]),P[i]*P[j]),N)

%p od od:

%p sort(convert(S,list));

%Y Odd terms are A046132.

%K nonn

%O 1,1

%A _J. M. Bergot_ and _Robert Israel_, Jan 28 2022