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.

A111166 Let p < q be consecutive primes; p is in the sequence if p/(q-p) is a record.

Original entry on oeis.org

2, 5, 11, 17, 29, 41, 59, 71, 101, 107, 137, 149, 179, 191, 197, 227, 239, 269, 281, 311, 347, 419, 431, 461, 521, 569, 599, 617, 641, 659, 809, 821, 827, 857, 881, 1019, 1031, 1049, 1061, 1091, 1151, 1229, 1277, 1289, 1301, 1319, 1427, 1451, 1481, 1487, 1607
Offset: 1

Views

Author

Bernardo Boncompagni, Oct 21 2005

Keywords

Comments

Conjecture: Except for first term, the sequence coincides with A001359. This is true for all primes < 2*10^7.
Conjecture: Except for first term, the sequence coincides with A001359. This is true for all primes < 7*10^16. Let n >= 2 be an integer, N +- 1 and M +- 1 two consecutive twin pairs where M>n*N. Finding a counterexample is the same as finding two consecutive primes P1 and P2 with n*N
The smallest prime(n) such that prime(n+1)/prime(n) is decreasing. [Thomas Ordowski, May 13 2012]
This sequence corresponds with A001359 for all terms less than 10^100. - Charles R Greathouse IV, May 14 2012

Examples

			a(0)=2 and the record is 2/(3-2)=2; a(1)<>3 because 3/(5-3)=1.5; a(1)=5 because 5/(7-5)=2.5
		

Crossrefs

Cf. A001359.

Programs

  • Mathematica
    rmax = 0; p = 2; seq = {}; Do[q = NextPrime[p]; r = p/(q-p); If[r > rmax, rmax = r; AppendTo[seq, p]]; p = q, {100}]; seq (* Amiram Eldar, Dec 24 2019 *)
    DeleteDuplicates[{#[[1]],#[[2]],#[[1]]/(#[[2]]-#[[1]])}&/@Partition[Prime[Range[300]],2,1],GreaterEqual[#1[[3]],#2[[3]]]&][[;;,1]] (* Harvey P. Dale, Jun 16 2025 *)