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!)
A127270 Primes prime(k) such that the sum of the composites between prime(k) and prime(k+2) is prime. 2

%I #12 Feb 28 2023 03:28:00

%S 19,79,229,271,349,359,373,677,733,743,751,797,937,1231,1279,1459,

%T 1489,1549,1733,1789,1801,1973,1979,2069,2539,2693,2777,2791,2837,

%U 2857,3061,3083,3191,3329,3557,3559,3659,3691,3719,3919,3929,3989,4129,4283,4447

%N Primes prime(k) such that the sum of the composites between prime(k) and prime(k+2) is prime.

%e The composites between prime(8) = 19 and prime(10) = 29 are 20, 21, 22, 24, 25, 26, 27, 28. Their sum 193 is prime, hence prime(8) = 19 is a term.

%t Do[p = Prime[n]; If[PrimeQ[Apply[Plus, Select[Table[i, {i, p + 1, Prime[n + 2] - 1}], Not[PrimeQ[ # ]] &]]], Print[p]], {n, 1, 1000}] (* _Michael Taktikos_, Apr 01 2007 *)

%o (Magma) [ p: p in [ NthPrime(k): k in [1..650] ] | IsPrime(&+[ c: c in [p+1..NextPrime(NextPrime(p))-1] ] - NextPrime(p)) ]; /* _Klaus Brockhaus_, Mar 29 2007 */

%K nonn

%O 1,1

%A _J. M. Bergot_, Mar 27 2007

%E Edited and extended by _Klaus Brockhaus_, Mar 29 2007

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 May 5 00:21 EDT 2024. Contains 372257 sequences. (Running on oeis4.)