OFFSET
1,1
LINKS
Chai Wah Wu, Table of n, a(n) for n = 1..3410
EXAMPLE
MATHEMATICA
Select[Range[1500], AllTrue[#+{NextPrime[#], NextPrime[#, -1]}, PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 09 2016 *)
PROG
(PARI) {for(i=3, 2*10^3, k=i+nextprime(i+1); q=i+precprime(i-1); if(isprime(k)&&isprime(q), print1(i, ", ")))}
(Python)
from gmpy2 import is_prime, next_prime
A249667_list, p = [], 2
for _ in range(10**4):
....q = next_prime(p)
....n1 = 2*p+1
....n2 = p+q+1
....while n1 < p+q:
........if is_prime(n1) and is_prime(n2):
............A249667_list.append(n1-p)
........n1 += 2
........n2 += 2
....p = q # Chai Wah Wu, Dec 06 2014
KEYWORD
nonn
AUTHOR
Antonio Roldán, Dec 03 2014
STATUS
approved