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!)
A105413 Numbers p(n) such that both p(n)+2 and p(n+6)-2 are prime numbers, where p(n) is the n-th prime. 2

%I #26 Sep 08 2022 08:45:17

%S 3,11,107,239,311,569,1019,1031,1229,1427,1997,2081,2087,2111,2687,

%T 3251,4049,4127,4157,4229,4241,4481,5231,5639,6089,7307,7559,8969,

%U 9629,10007,10457,13691,13829,13901,14249,14549,14561,16187,16649,17207

%N Numbers p(n) such that both p(n)+2 and p(n+6)-2 are prime numbers, where p(n) is the n-th prime.

%C Conjecture: There are an infinite number of primes p(n) such that p(n)+2 and p(n+k)-2 are both prime for all k > 1.

%H Harvey P. Dale, <a href="/A105413/b105413.txt">Table of n, a(n) for n = 1..1000</a>

%e prime(5)=11, and both prime(5)+2=13 and prime(5+6)-2=29 are prime, so 11 is in the sequence.

%t For[n = 1, n < 500, n++, If[PrimeQ[Prime[n] + 2], If[PrimeQ[Prime[n + 6] - 2], Print[Prime[n]]]]] (* _Stefan Steinerberger_, Feb 07 2006 *)

%t Transpose[Select[Partition[Prime[Range[2000]],7,1],#[[2]]-#[[1]] == #[[7]]- #[[6]] == 2&]][[1]] (* _Harvey P. Dale_, Oct 08 2014 *)

%o (PARI) pnpk(n, m=6, k=2) = { local(x, v1, v2); for(x=1, n, v1 = prime(x)+ k; v2 = prime(x+m)-k; if(isprime(v1)&isprime(v2), print1(prime(x), ", ") ) ) ;} \\ corrected by _Michel Marcus_, Sep 14 2015

%o (Magma) [NthPrime(n): n in [1..2000] | IsPrime(NthPrime(n)+2) and IsPrime(NthPrime(n+6)-2)]; // _Vincenzo Librandi_, Sep 14 2015

%Y Cf. A089635. - _Harvey P. Dale_, Oct 08 2014

%K nonn

%O 1,1

%A _Cino Hilliard_, May 02 2005

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 23 07:42 EDT 2024. Contains 371905 sequences. (Running on oeis4.)