The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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
3, 11, 107, 239, 311, 569, 1019, 1031, 1229, 1427, 1997, 2081, 2087, 2111, 2687, 3251, 4049, 4127, 4157, 4229, 4241, 4481, 5231, 5639, 6089, 7307, 7559, 8969, 9629, 10007, 10457, 13691, 13829, 13901, 14249, 14549, 14561, 16187, 16649, 17207 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
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.
LINKS
EXAMPLE
prime(5)=11, and both prime(5)+2=13 and prime(5+6)-2=29 are prime, so 11 is in the sequence.
MATHEMATICA
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 *)
Transpose[Select[Partition[Prime[Range[2000]], 7, 1], #[[2]]-#[[1]] == #[[7]]- #[[6]] == 2&]][[1]] (* Harvey P. Dale, Oct 08 2014 *)
PROG
(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
(Magma) [NthPrime(n): n in [1..2000] | IsPrime(NthPrime(n)+2) and IsPrime(NthPrime(n+6)-2)]; // Vincenzo Librandi, Sep 14 2015
CROSSREFS
Cf. A089635. - Harvey P. Dale, Oct 08 2014
Sequence in context: A238446 A337734 A302927 * A241587 A183381 A136985
KEYWORD
nonn
AUTHOR
Cino Hilliard, May 02 2005
STATUS
approved

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 June 18 18:14 EDT 2024. Contains 373486 sequences. (Running on oeis4.)