login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A304372 Primes p such that prime(p) + p + 1 and prime(p) - p - 1 are both prime. 0
5, 11, 23, 29, 149, 269, 293, 347, 617, 647, 683, 761, 809, 1259, 1553, 1619, 2003, 2063, 2081, 2129, 2297, 2309, 2381, 2579, 2693, 2897, 3023, 3557, 4241, 4721, 4799, 4817, 5519, 6197, 6719, 6833, 6959, 8237, 8537, 8597, 8783, 9029, 9461, 9677, 9929 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Subsequence of A317909 and consequently the resulting primes are a subsequence of A112885 (see A317909 for proof).

LINKS

Table of n, a(n) for n=1..45.

EXAMPLE

p=5; prime(5) + 5 + 1 = 17 and prime(5) - 5 - 1 = 5, both prime so 5 is a member, and since the same does not hold for primes 2 and 3, a(1)=5.

MAPLE

N:=5000:

for X from 1 to N do

A:=ithprime(X);

P:=A+X+1;

Q:=A-X-1;

if isprime(X) and isprime(P) and isprime(Q) then print(X);

end if:

end do:

MATHEMATICA

Select[Prime[Range[2 10^3]], And@@PrimeQ[{Prime[#] + # + 1, Prime[#] - # - 1}] &] (* Vincenzo Librandi, Aug 18 2018 *)

PROG

(MAGMA) [n: n in [1..2*10^4] | IsPrime(n) and IsPrime (NthPrime(n)+n+1) and IsPrime (NthPrime(n)-n-1)]; // Vincenzo Librandi, Aug 18 2018

(PARI) isok(p) = isprime(p) && isprime(prime(p) + p + 1) && isprime(prime(p) - p - 1); \\ Michel Marcus, Aug 18 2018

CROSSREFS

Cf. A112885, A317909.

Sequence in context: A228485 A161896 A317909 * A167610 A295149 A143127

Adjacent sequences:  A304369 A304370 A304371 * A304373 A304374 A304375

KEYWORD

nonn,easy

AUTHOR

David James Sycamore, Aug 16 2018

EXTENSIONS

More terms from Vincenzo Librandi, Aug 18 2018

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 3 19:43 EDT 2020. Contains 333198 sequences. (Running on oeis4.)