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!)
A280266 Primes such that the previous prime plus the next prime plus 1 is also prime. 2
5, 7, 13, 19, 31, 37, 43, 47, 53, 61, 73, 79, 89, 97, 137, 151, 167, 173, 193, 199, 223, 229, 241, 251, 271, 349, 353, 367, 379, 383, 409, 439, 457, 463, 487, 503, 521, 523, 587, 593, 619, 643, 647, 653, 727, 787, 797, 809, 829, 853, 859, 937 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
5 is in the sequence because 3 + 7 + 1 = 11, which is prime.
7 is in the sequence because 5 + 11 + 1 = 17, which is prime.
11 is not in the sequence because 7 + 13 + 1 = 21, which is not prime.
MATHEMATICA
fQ[p_] := PrimeQ[ NextPrime[p, -1] + NextPrime[ p] +1]; Select[ Prime@ Range[2, 170], fQ] (* Robert G. Wilson v, Dec 30 2016 *)
Select[Partition[Prime[Range[200]], 3, 1], PrimeQ[#[[1]]+#[[3]]+1]&][[All, 2]] (* Harvey P. Dale, Dec 16 2018 *)
PROG
(Sage)
max_next_p = 1000
seq = []
prev_p = nth_prime(1)
p = nth_prime(2)
for next_p in primes(nth_prime(3), max_next_p):
if is_prime(prev_p + next_p + 1):
seq.append(p)
prev_p = p
p = next_p
print(seq)
(PARI) isok(n) = isprime(n) && isprime(precprime(n-1) + nextprime(n+1) + 1); \\ Michel Marcus, Dec 30 2016
CROSSREFS
Sequence in context: A227420 A099349 A167464 * A370008 A243457 A189441
KEYWORD
nonn
AUTHOR
Robert C. Lyons, Dec 30 2016
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 April 18 20:26 EDT 2024. Contains 371781 sequences. (Running on oeis4.)