login
Primes p with q = prime(p) - p + 1 and r = prime(q) - q + 1 both prime.
8

%I #16 Nov 07 2014 02:03:40

%S 2,3,5,17,23,41,61,83,181,271,311,337,757,953,1277,1451,1753,1777,

%T 2027,2081,2341,2707,2713,2749,2819,2861,2879,2909,2971,3121,3163,

%U 3329,3697,3779,3833,3881,3907,4027,4051,4129,4363,4549,5333,5483,5659,5743,5813,5897,6029,6053

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

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

%C Conjecture: For any integer m > 1, there are infinitely many chains p(1) < p(2) < ... < p(m) of m primes with p(k+1) = prime(p(k)) - p(k) + 1 for all 0 < k < m.

%H Zhi-Wei Sun, <a href="/A235925/b235925.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) = 2 since prime(2) - 2 + 1 = 2 is prime.

%e a(2) = 3 since prime(3) - 3 + 1 = 3 is prime.

%e a(3) = 5 since 5, prime(5) - 5 + 1 = 7 and prime(7) - 7 + 1 = 11 are all prime.

%t f[n_]:=Prime[n]-n+1

%t n=0;Do[If[PrimeQ[f[Prime[k]]]&&PrimeQ[f[f[Prime[k]]]],n=n+1;Print[n," ",Prime[k]]],{k,1,1000}]

%t bpQ[n_]:=Module[{q=Prime[n]-n+1},AllTrue[{q,Prime[q]-q+1},PrimeQ]]; Select[Prime[Range[800]],bpQ](* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Nov 07 2014 *)

%Y Cf. A000040, A234695, A235924.

%K nonn

%O 1,1

%A _Zhi-Wei Sun_, Jan 17 2014