A235925 Primes p with q = prime(p) - p + 1 and r = prime(q) - q + 1 both prime.
2, 3, 5, 17, 23, 41, 61, 83, 181, 271, 311, 337, 757, 953, 1277, 1451, 1753, 1777, 2027, 2081, 2341, 2707, 2713, 2749, 2819, 2861, 2879, 2909, 2971, 3121, 3163, 3329, 3697, 3779, 3833, 3881, 3907, 4027, 4051, 4129, 4363, 4549, 5333, 5483, 5659, 5743, 5813, 5897, 6029, 6053
Offset: 1
Keywords
Examples
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.
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
Programs
-
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 *)
Comments