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

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

%S 5,41,179,197,281,599,641,809,827,857,1061,1451,2237,2549,3119,3329,

%T 3359,3821,4001,4091,4217,5417,5441,5849,6269,6659,6761,6791,7457,

%U 7949,8387,8597,9239,9419,9431,9677,10301,10427,10859,10889,11117,11717

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

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

%e prime(13)=41, and both prime(13)+2=43 and prime(13+5)-2=59 are prime, so 41 is in the sequence.

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

%o (PARI) pnpk(n, m=5, 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..1500] | IsPrime(NthPrime(n)+2) and IsPrime(NthPrime(n+5)-2)]; // _Vincenzo Librandi_, Sep 14 2015

%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 27 16:49 EDT 2024. Contains 372020 sequences. (Running on oeis4.)