|
|
A063095
|
|
Record prime gap among first n+1 primes.
|
|
5
|
|
|
1, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
REFERENCES
|
D. S. Mitrinovic et al., Handbook of Number Theory, Kluwer, 1996, Section VII.22, p. 249. (See G(x), which is an analog of pi(x).)
|
|
LINKS
|
|
|
EXAMPLE
|
A value of d in this sequence persists until a larger value arises. Note that values like 10, 12, 16 are never maximal. Distinct, increasing prime gaps are given in A005250.
|
|
MATHEMATICA
|
Table[Max[Table[Prime[w+1]-Prime[w], {w, 1, j}]], {j, 1, 500}] a(n)= Max{p[j+1]-p[j]; j=1, ..n}
|
|
PROG
|
(Python)
from sympy import nextprime
c, p = 0, 2
for i in range(n):
q = nextprime(p)
c, p = max(c, q-p), q
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|