This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A068843 #26 Dec 23 2024 14:53:42 %S A068843 37,11,17,2,1091,2897,13451,448363,7407287,34400141,255030533, %T A068843 6564959561,45605475961,121054164221,2552790756469 %N A068843 Smallest prime in the first occurrence of a nondecreasing difference for a set of exactly n successive primes. %C A068843 This is the same as asking for the smallest prime in the first occurrence of a nonnegative second difference for a set of n successive primes. %H A068843 Zak Seidov, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2017-May/017558.html">Consecutive non-decreasing prime gaps</a>, SeqFan list, May 16 2017 %e A068843 The prime 2 starts the first run of exactly 4 nondecreasing gaps (1, 2, 2, 4) between the 5 primes (2, 3, 5, 7, 11). (The next gap would be of 2, smaller than 4.) Therefore a(4) = 2. %e A068843 The prime 11 starts the first run of exactly 2 nondecreasing gaps (2, 4) between the 3 primes (11, 13, 17). (The preceding gap is 4 > 2 and the next gap would be 2 < 4.) Therefore a(2) = 11. The sequences of primes (2, 3, 5) as well as (5, 7, 11) are part of a longer run of nondecreasing gaps and are therefore not considered for the case n = 2. %e A068843 The prime 17 starts the first run of exactly 3 nondecreasing gaps (2, 4, 4) between the 4 primes (17, 19, 23, 29). (The preceding gap is 4 > 2 and the next gap would be 2 < 4.) Therefore a(3) = 17. Again, primes which are part of a longer run cannot be considered. %e A068843 The prime 37 starts the first run of exactly 1 nondecreasing gap (4) between the primes 37 and 41. (The preceding gap is 6 > 4 and the next gap would be 2 < 4.) Therefore a(1) = 37. %t A068843 (* used to find a(11) *) k = 0; While[p = Select[ Range[ k*10^6, (k + 1)*10^6 + 10^4], PrimeQ[ # ] & ]; l = Length[p]; d1 = Take[p, 1 - l] - Take[p, l - 1]; d2 = Take[d1, 2 - l] - Take[d1, l - 2]; s = Sign[ Sign[d2] + 1]; q = StringPosition[ ToString[s], StringDrop[ StringDrop[ ToString[ Table[1, {10}]], 1], -1]]; q == {}, k++ ]; p[[ (q[[1, 1]] + 1)/3 ]] %o A068843 (PARI) A068843(n,c=n+1,g,o=2,P=2)={forprime(p=3,,c--;g>(g=-o+o=p)||next; c||break; c=n; P=p-g);P} \\ _M. F. Hasler_, May 16 2017 %Y A068843 Cf. A158939, A158940. %K A068843 nonn,base,hard,more %O A068843 1,1 %A A068843 _Amarnath Murthy_, Mar 10 2002 %E A068843 More terms from _Robert G. Wilson v_, May 10 2002 and Dec 08 2002, who finds that a(12) > 2.7*10^9 %E A068843 a(12) = 6564959561 from _Zak Seidov_ and other edits by _M. F. Hasler_, May 16 2017 %E A068843 a(13)-a(15) from _Giovanni Resta_, May 18 2017