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.

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 17 2014

Keywords

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.

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.
		

Crossrefs

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 *)