login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A328822 Primes of the form p=3*q+3*r+q*r where q and r are distinct primes and 2*p-3*q, 2*p-3*r and 2*p-q*r are also prime. 2

%I #14 Aug 12 2020 11:27:32

%S 103,151,439,503,727,751,887,1063,1091,1223,1447,1951,2791,2903,3079,

%T 3191,3371,3491,3851,4567,5051,5431,5591,5647,6151,6491,7591,9463,

%U 9623,11171,12911,14891,15511,16183,17203,18787,19031,19403,19991,20231,21863,22111,22391,22567,24251,24407,26951

%N Primes of the form p=3*q+3*r+q*r where q and r are distinct primes and 2*p-3*q, 2*p-3*r and 2*p-q*r are also prime.

%C The first term that occurs for more than one pair (q,r) is a(11)=1447, which corresponds to (q,r) = (5, 179) and (11, 101).

%C The first term that occurs for more than two pairs (q,r) is a(2579)=15108791, which corresponds to (q,r) = (17, 755437), (37, 377717), and (2797, 5393).

%H Robert Israel, <a href="/A328822/b328822.txt">Table of n, a(n) for n = 1..6030</a>

%e a(3)=439 is in the sequence because q=5 and r=53 are distinct primes with 439=3*q+3*r+q*r and 439, 2*439-3*q=863, 2*439-3*r=719 and 2*439-q*r=613 are all primes.

%p N:= 10^5: # to get all terms <= N

%p Primes:= select(isprime, [seq(i, i=3..nextprime(N/8), 2)]):

%p filter:= proc(p, q, r)

%p isprime(p*q+2*p*r+2*q*r) and isprime(2*p*q+p*r+2*q*r) and isprime(2*p*q+2*p*r+q*r)

%p end proc:

%p p:= 3: R:= {}:

%p for iq from 2 do

%p q:= Primes[iq];

%p if 2*p*q + q^2 >= N then break fi;

%p for ir from iq+1 do

%p r:= Primes[ir];

%p s:= p*q + q*r + p*r;

%p if s > N then break fi;

%p if isprime(s) and filter(p, q, r) then

%p R:= R union {s};

%p fi;

%p od od:

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

%t M = 10^5; (* to get all terms <= M *)

%t filterQ[p_, q_, r_] := PrimeQ[p q + 2 p r + 2 q r] && PrimeQ[2 p q + p r + 2 q r] && PrimeQ[2 p q + 2 p r + q r];

%t primes = Select[Table[i, {i, 3, NextPrime[M/8], 2}], PrimeQ];

%t p = 3; R = {};

%t For[iq = 2, True, iq++, q = primes[[iq]]; If[2 p q + q^2 >= M, Break[]]; For[ir = iq + 1, True, ir++, r = primes[[ir]]; s = p q + q r + p r; If[s > M, Break[]]; If[PrimeQ[s] && filterQ[p, q, r], R = Union[R, {s}]]]];

%t R (* _Jean-François Alcover_, Aug 12 2020, after _Robert Israel_ *)

%Y Primes in A328805.

%K nonn

%O 1,1

%A _Robert Israel_, Oct 28 2019

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 04:17 EDT 2024. Contains 371696 sequences. (Running on oeis4.)