%I #31 Sep 26 2015 18:34:47
%S 11,19,61,43,97,163,191,229,283,223,743,991,541,457,877,1327,1049,
%T 1321,1733,1307,1987,6011,2971,5153,2029,8693,2551,4789,5407,2129,
%U 6473,4481,4889,4217,7951,11743,13789,9851,7253,11491,20393,17231,9749,20747,6599,13873,16369,15461,17123,13451,9967,26959,21089,41863,27437,26003,40189,18661,16673,64693
%N The smallest prime p that makes the pair p+/-6n both primes while no other pair of p+/-6k+6*n, 0<k<n both primes.
%C Dickson's conjecture implies that this sequence is infinite. - _Charles R Greathouse IV_, Mar 22 2011
%C 2a(n) = (p-6n) + (p+6n).
%H Charles R Greathouse IV, <a href="/A139602/b139602.txt">Table of n, a(n) for n = 1..1000</a>
%e For n = 1, 11-6n=5, 11+6n=17, are both primes, and for any prime number p smaller than 11, it is impossible that p-6 is prime;
%e For n = 2, 19-6n=7, 19+6n=31, are both primes,while 19+6*1=25 is not prime. For primes p<19, either p+/-6 are prime pairs, or p+/-12 are not a prime pair;
%e ...
%e for n = 6, 163-6n=127, 163+6n=199, are both primes,while 163+6*k, k=1,2,4 and 163-6*k, k=3,5 are not primes. For primes p<163, either exists prime pair p+/-6k, 0<k<6, or p+/-36 are not a prime pair.
%t BothPrime[p_, k_] := PrimeQ[p + 6*k] && PrimeQ[p - 6*k]; f[n_] := Module[{p,k}, p = Prime[PrimePi[6*n] + 1]; While[k = 1; While[k < n && ! BothPrime[p, k], k++]; k < n || ! BothPrime[p, n], p = NextPrime[p]]; p]; Table[f[n], {n,60}]
%o (PARI) a(n)=forprime(p=2,default(primelimit),if(!isprime(p-6*n) || !isprime(p+6*n), next); for(k=1,n-1,if(isprime(p-6*k) && isprime(p+6*k), next(2))); return(p)) \\ _Charles R Greathouse IV_, Mar 22 2011
%K nonn
%O 1,1
%A _Lei Zhou_, Mar 22 2011