cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A139602 The smallest prime p that makes the pair p+/-6n both primes while no other pair of p+/-6k+6*n, 0 both primes.

This page as a plain text file.
%I A139602 #31 Sep 26 2015 18:34:47
%S A139602 11,19,61,43,97,163,191,229,283,223,743,991,541,457,877,1327,1049,
%T A139602 1321,1733,1307,1987,6011,2971,5153,2029,8693,2551,4789,5407,2129,
%U A139602 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 A139602 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 A139602 Dickson's conjecture implies that this sequence is infinite. - _Charles R Greathouse IV_, Mar 22 2011
%C A139602 2a(n) = (p-6n) + (p+6n).
%H A139602 Charles R Greathouse IV, <a href="/A139602/b139602.txt">Table of n, a(n) for n = 1..1000</a>
%e A139602 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 A139602 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 A139602 ...
%e A139602 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 A139602 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 A139602 (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 A139602 nonn
%O A139602 1,1
%A A139602 _Lei Zhou_, Mar 22 2011