OFFSET
1,1
LINKS
Martin Raab, Table of n, a(n) for n = 1..82 (first 75 terms from Max Alekseyev)
Harvey Dubner, Twin Prime Conjectures, Journal of Recreational Mathematics, Vol. 30 (3), 1999-2000.
Alexei Kourbatov, Maximal gaps between prime k-tuples: a statistical approach, arXiv preprint arXiv:1301.2242 [math.NT], 2013.
Alexei Kourbatov, Tables of record gaps between prime constellations, arXiv preprint arXiv:1309.4053 [math.NT], 2013.
Alexei Kourbatov and Marek Wolf, Predicting maximal gaps in sets of primes, arXiv preprint arXiv:1901.03785 [math.NT], 2019.
Mersenneforum, Gaps between prime pairs (Twin Primes).
Tomás Oliveira e Silva, Gaps between twin primes
EXAMPLE
The smallest twin prime pair is 3, 5, then 5, 7 so a(1) = 3; the following pair is 11, 13 so a(2) = 5 because 11 - 5 = 6 > 5 - 3 = 2; the following pair is 17, 19: since 17 - 11 = 6 = 11 - 5 nothing happens; the following pair is 29, 31 so a(3)= 17 because 29 - 17 = 12 > 11 - 5 = 6.
MATHEMATICA
NextLowerTwinPrim[n_] := Block[{k = n + 2}, While[ !PrimeQ[k] || !PrimeQ[k + 2], k++ ]; k]; p = 3; r = 0; t = {3}; Do[q = NextLowerTwinPrim[p]; If[q > r + p, AppendTo[t, p]; r = q - p]; p = q, {n, 10^9}] (* Robert G. Wilson v, Oct 22 2005 *)
CROSSREFS
KEYWORD
nonn,changed
AUTHOR
Bernardo Boncompagni, Oct 21 2005
EXTENSIONS
a(22)-a(30) from Robert G. Wilson v, Oct 22 2005
Terms up to a(72) are listed in Kourbatov (2013), terms up to a(75) in Oliveira e Silva's website, added by Max Alekseyev, Nov 06 2015
STATUS
approved