OFFSET
1,1
COMMENTS
By the conjecture in A235924, this sequence should have infinitely many terms.
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.
LINKS
Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Z.-W. Sun, Problems on combinatorial properties of primes, arXiv:1402.6641, 2014
EXAMPLE
a(1) = 2 since prime(2) - 2 + 1 = 2 is prime.
a(2) = 3 since prime(3) - 3 + 1 = 3 is prime.
a(3) = 5 since 5, prime(5) - 5 + 1 = 7 and prime(7) - 7 + 1 = 11 are all prime.
MATHEMATICA
f[n_]:=Prime[n]-n+1
n=0; Do[If[PrimeQ[f[Prime[k]]]&&PrimeQ[f[f[Prime[k]]]], n=n+1; Print[n, " ", Prime[k]]], {k, 1, 1000}]
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Jan 17 2014
STATUS
approved