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!)
A049437 Primes p such that p+2 and p+8 are also primes but p+6 is not. 11

%I #28 Sep 08 2022 08:44:58

%S 3,29,59,71,149,269,431,569,599,1031,1061,1229,1289,1319,1451,1619,

%T 2129,2339,2381,2549,2711,2789,3299,3539,4019,4049,4091,4649,4721,

%U 5099,5441,5519,5639,5741,5849,6269,6359,6569,6701,6959,7211

%N Primes p such that p+2 and p+8 are also primes but p+6 is not.

%C p+4 is not prime here except for p=3.

%H Iain Fox, <a href="/A049437/b049437.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from R. J. Mathar)

%e p=29 is the smallest prime so that p, p+2 and p+8 are consecutive primes.

%p select(p -> isprime(p) and isprime(p+2) and isprime(p+8) and not isprime(p+6), [3, seq(i,i=5..10000, 6)]); # _Robert Israel_, Nov 20 2017

%t {3}~Join~Select[Partition[Prime@ Range[10^3], 3, 1], Differences@ # == {2, 6} &][[All, 1]] (* _Michael De Vlieger_, Nov 20 2017 *)

%o (Magma) [p: p in PrimesUpTo(8000)| IsPrime(p+2) and IsPrime(p+8) and not IsPrime(p+6) ] // _Vincenzo Librandi_, Jan 28 2011

%o (PARI) lista(nn) = forprime(p=3, nn, if(isprime(p+2) && isprime(p+8) && !isprime(p+6), print1(p, ", "))) \\ _Iain Fox_, Nov 20 2017

%Y Cf. A007530, A023202, A031926, A046134, A046138, A049436, A049438, A046138.

%Y Subsequence of A001359. - _R. J. Mathar_, Feb 10 2013

%K nonn

%O 1,1

%A _Labos Elemer_

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 24 18:17 EDT 2024. Contains 371962 sequences. (Running on oeis4.)