|
|
A242459
|
|
Maximal differences of A029707.
|
|
0
|
|
|
1, 2, 3, 4, 6, 12, 20, 24, 27, 29, 42, 54, 72, 75, 103, 128, 131, 151, 153, 162, 164, 181, 204, 208, 209, 211, 237, 265
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
There are no more terms below prime(10^7) = 179424673.
|
|
LINKS
|
|
|
MATHEMATICA
|
nextLesserTwinPrime[p_Integer] := Block[{q = p + 2}, While[ NextPrime@ q - q > 2, q = NextPrime@ q]; q]; p = 2; q = 3; px = 1; qx = 2; mxd = 0; tpx = 0; lst = {}; While[p <
5090000001, d = qx - px; If[ d > mxd, mxd = d; AppendTo[ lst, d]; Print@ d]; p = q; px = qx; q = nextLesserTwinPrime@ q; qx = PrimePi@ q; tpx++]; lst (* Robert G. Wilson v, May 21 2014 *)
|
|
PROG
|
(Sage)
a = [ 1 ]
st = 3
for i in (4..n) :
if (nth_prime(i+1)-nth_prime(i) == 2) :
if i-st > a[len(a)-1] :
a.append(i-st)
st = i
return(a)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|