login
Primes p with prime(p) - p - 1 and prime(p) - p + 1 both prime.
11

%I #10 Apr 06 2014 04:12:12

%S 5,17,23,41,71,83,173,293,337,353,563,571,719,811,911,953,1201,1483,

%T 1579,1877,2081,2089,2309,2579,2749,2803,3329,3343,3511,3691,3779,

%U 3851,3881,3907,4021,4049,4093,4657,4813,5051,5179,5333,5519,5591,6053,6547,6841,7151,7723,8209

%N Primes p with prime(p) - p - 1 and prime(p) - p + 1 both prime.

%C By the conjecture in A236097, this sequence should have infinitely many terms.

%H Zhi-Wei Sun, <a href="/A236119/b236119.txt">Table of n, a(n) for n = 1..10000</a>

%H Z.-W. Sun, <a href="http://arxiv.org/abs/1402.6641">Problems on combinatorial properties of primes</a>, arXiv:1402.6641, 2014

%e a(1) = 5 since neither prime(2) - 2 - 1 = 0 nor prime(3) - 3 - 1 = 1 is prime, but prime(5) - 5 - 1 = 5 and prime(5) - 5 + 1 = 7 are both prime.

%t p[n_]:=PrimeQ[Prime[n]-n-1]&&PrimeQ[Prime[n]-n+1]

%t n=0;Do[If[p[Prime[k]],n=n+1;Print[n," ",Prime[k]]],{k,1,1100}]

%o (PARI) s=[]; forprime(p=2, 10000, if(isprime(prime(p)-p-1) && isprime(prime(p)-p+1), s=concat(s, p))); s \\ _Colin Barker_, Jan 19 2014

%Y Cf. A000040, A001359, A006512, A014574, A234695, A235925, A236097.

%K nonn

%O 1,1

%A _Zhi-Wei Sun_, Jan 19 2014