OFFSET
1,1
COMMENTS
The gap between 31397 and 31454 is due to the record prime gap between 31397 and 31469 being almost exactly twice the record prime gap between 15683 and 15727.
LINKS
Robert G. Wilson v, Table of n, a(n) for n = 1..37
EXAMPLE
a(3) = 47 because the next number that is a prime or twice a prime after 47 is 53, and that is a record gap of size 6.
MATHEMATICA
nxt[n_] := Block[{k = n +1}, While[ !PrimeQ[ k] && ! PrimeQ[ k/2], k++]; k]; p = 2; q = 3; mx = 0; lst = {}; While[p < 2500000000, If[q > mx + p, mx = q - p; AppendTo[ lst, p]]; p = q; q = nxt@ q]; lst (* Robert G. Wilson v, Aug 03 2017 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Bobby Jacobs, Aug 03 2017
EXTENSIONS
a(11) onward from Robert G. Wilson v, Aug 03 2017
STATUS
approved