

A031132


Record differences between nth prime and (n+2)nd prime.


9



3, 4, 6, 10, 12, 14, 18, 24, 28, 40, 42, 44, 48, 50, 56, 58, 72, 76, 80, 82, 100, 114, 116, 126, 138, 140, 160, 190, 200, 234, 236, 246, 248, 270, 306, 328, 330, 336, 340, 372, 376, 410, 436, 438, 450, 476, 502, 506, 524, 540, 546, 594, 600, 624, 678, 690, 700, 760, 780, 838, 900, 944, 972, 1014, 1016, 1032, 1152
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,1


LINKS



FORMULA



EXAMPLE

The difference a(49) = 524 first occurs at prime(2158173265)  prime(2158173263) = 50949283633  50949283109 = 524.  Jon E. Schoenfield, Aug 29 2006


MATHEMATICA

d = 0; lst = {}; {p, q, r} = {1, 2, 3}; Do[{p, q, r} = {q, r, Prime@n}; If[r  p > d, d = r  p; AppendTo[lst, {p, r}]; Print[{p, rp, r}]], {n, 212550893}]; Last /@ lst  First /@ lst (* Robert G. Wilson v, May 17 2006 *)
dist = 0; n = 0; While[n<250000000, n++; tmp = Prime[n + 2]  Prime[n]; If[tmp > dist, dist = tmp; Print[tmp]]; ]; (* Sam Handler (sam_5_5_5_0(AT)yahoo.com), Aug 08 2006 *)


CROSSREFS



KEYWORD

nonn


AUTHOR



EXTENSIONS

Further extended by Jud McCranie, Jan 03 2001 and again on May 18 2006


STATUS

approved



