The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A031132 Record differences between n-th 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, r-p, 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
See A031133 for lower primes and A031134 for upper primes.
Sequence in context: A082694 A004793 A336909 * A322165 A057477 A309317
KEYWORD
nonn
AUTHOR
EXTENSIONS
Extended (and first term added) by Patrick De Geest, Oct 15 2000
Further extended by Jud McCranie, Jan 03 2001 and again on May 18 2006
a(50)-a(52) from Jon E. Schoenfield, Sep 02 2006
a(53)-a(55) from Dmitry Kamenetsky, Jul 28 2008
a(55) corrected, a(56)-a(62) added by Dmitry Petukhov, Sep 22 2015
a(63)-a(67) added by Vladimir Chirkov and Natalia Makarova, Sep 24 2015, Sep 29 2015
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 01:34 EDT 2024. Contains 372900 sequences. (Running on oeis4.)