OFFSET
1,1
COMMENTS
The merit of the gap between consecutive primes p and q is (q-p)/log(p).
This sequence is infinite (Westzynthius 1931). - Charles R Greathouse IV, Nov 10 2016
FORMULA
MATHEMATICA
p = 2; q = 3; lmt = 0; lst = {}; While[p < 10^12, If[q > p + lmt*Log[p], AppendTo[lst, q]; Print[q]; lmt = (q - p)/Log[p]]; p = q; q = NextPrime@ p]; lst (* or *)
(* set lst = the terms in A111870 *) NextPrime[ lst] (* Robert G. Wilson v, Nov 07 2016 *)
PROG
(PARI) r=rm=0; p=2; forprime(q=3, , t=q-p; if(t>r, r=t; t/=log(p); if(t>rm, rm=t; print1(q", "))); p=q) \\ Charles R Greathouse IV, Nov 11 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Bobby Jacobs, Nov 07 2016
EXTENSIONS
More terms from Robert G. Wilson v, Nov 07 2016
STATUS
approved