%I #24 Oct 13 2015 16:05:33
%S 3390,66570,70140,84810,132330,136710,222840,225750,242730,271770,
%T 288930,320010,330330,377370,390390,414330,463890,489960,505710,
%U 644670,758340,819390,830310,857010,895650,906540,908910,924810,952380,968520,974820
%N Numbers n where n-17, n-1, n+1 and n+17 are consecutive primes.
%C This is a subsequence of A014574 (average of twin prime pairs), A256753 and A249674 (30n).
%H Karl V. Keller, Jr., <a href="/A262176/b262176.txt">Table of n, a(n) for n = 1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TwinPrimes.html">Twin Primes</a>
%e 3390 is the average of the four consecutive primes 3373, 3389, 3391, 3407.
%e 66570 is the average of the four consecutive primes 66553, 66569, 66571, 66587.
%t Select[Prime@ Range@ 50000, NextPrime[#, {1, 2, 3}] == {16, 18, 34} + # &] + 17 (* _Giovanni Resta_, Sep 14 2015 *)
%o (Python)
%o from sympy import isprime,prevprime,nextprime
%o for i in range(0,3000001,6):
%o ..if isprime(i-1) and isprime(i+1) and prevprime(i-1)==i-17 and nextprime(i+1)==i+17 : print (i,end=', ')
%o (PARI) list(l)=for(i=1,l,p=prime(i);if(p+16==prime(i+1)&&p+18==prime(i+2)&&p+34==prime(i+3),print1(p+17,", "))) \\ _Anders Hellström_, Sep 14 2015
%o (Perl) use ntheory ":all"; say $_+1 for grep { next_prime($_+2)-$_ == 18 && $_-prev_prime($_) == 16} @{twin_primes(1e9)}; # _Dana Jacobsen_, Oct 13 2015
%o (Perl) use ntheory ":all"; say $_+17 for grep { next_prime($_+0)-$_ == 16 && next_prime($_+18)-$_ == 34} sieve_prime_cluster(1,1e9,16,18,34); # _Dana Jacobsen_, Oct 13 2015
%Y Cf. A014574, A077800 (twin primes), A249674, A256753.
%K nonn
%O 1,1
%A _Karl V. Keller, Jr._, Sep 13 2015