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!)
A287653 Prime numbers of the form p*q + q*r + r*s with p,q,r,s consecutive primes. 3

%I #17 Jul 07 2024 11:22:24

%S 127,1427,2003,2713,7639,76519,81703,139663,166643,173777,349589,

%T 371027,653357,696083,752033,793699,883549,938617,974713,1150733,

%U 1176983,1207223,1310779,1675577,1702577,1880363,2715169

%N Prime numbers of the form p*q + q*r + r*s with p,q,r,s consecutive primes.

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

%e a(1) = 127 = 3*5 + 5*7 + 7*11 =

%e A000040(2)*A000040(3) + A000040(3)*A000040(4) + A000040(4)*A000040(5) =

%e A006094(2) + A006094(3) + A006094(4).

%p N:= 100: # to get a(1) - a(N)

%p p:= 2: q:= 3: r:= 5: s:= 7:

%p count:= 0:

%p while count < N do

%p p:= q; q:= r; r:= s; s:= nextprime(s);

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

%p if isprime(n) then count:= count+1; A[count]:= n fi

%p od:

%p seq(A[i],i=1..N); # _Robert Israel_, May 29 2017

%t Select[#[[1]]#[[2]]+#[[2]]#[[3]]+#[[3]]#[[4]]&/@Partition[Prime[Range[200]],4,1],PrimeQ] (* _Harvey P. Dale_, Jul 07 2024 *)

%o (PARI) {p=2;q=3;r=5;s=7;for(k=1,1000,if(isprime(a=p*q+q*r+r*s),

%o print1(a","));p=q;q=r;r=s;s=nextprime(1+s))}

%o (Python)

%o from sympy import nextprime, isprime

%o A287653_list, pq, qr, rs, s = [], 6, 15, 35, 7

%o while s <= 10**6:

%o n = pq+qr+rs

%o if isprime(n):

%o A287653_list.append(n)

%o t = nextprime(s)

%o pq, qr, rs, s = qr, rs, s*t, t # _Chai Wah Wu_, May 29 2017

%Y Cf. A000040 (prime numbers), A006094 (products of 2 successive primes).

%K nonn

%O 1,1

%A _Zak Seidov_, May 29 2017

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 August 16 15:08 EDT 2024. Contains 375177 sequences. (Running on oeis4.)