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 A246033 #27 Jun 07 2023 09:44:48 %S A246033 2,3,7,19,47,73,113,199,283,467,661,887,1129,1327,1627,2803,3947,4297, %T A246033 5881,6379,7043,9949,10343,13187,15823,18461,24137,33647,34763,37663, %U A246033 42863,43067,59753,59797,82619,96017,102679,129643,130699,142237,155893,187477,194119 %N A246033 "Convex" primes: extremal primes in the sense of Tutaj. %C A246033 See Tutaj (2014) for the precise definition. %H A246033 Rémy Sigrist, <a href="/A246033/b246033.txt">Table of n, a(n) for n = 1..500</a> %H A246033 Nathan McNew, <a href="http://dx.doi.org/10.1080/10586458.2016.115518">The Most Frequent Values of the Largest Prime Divisor Function</a>, Exper. Math., 2017, Vol. 26, No. 2, 210-224; also <a href="http://arxiv.org/abs/1504.05985">arXiv:1504.05985 [math.NT]</a>, 2015. %H A246033 Carl Pomerance, <a href="https://doi.org/10.1090/S0025-5718-1979-0514836-7">The Prime Number Graph</a>, Mathematics of Computations, Volume 33, 145, January 1979, pages 399-408. %H A246033 Edward Tutaj, <a href="http://arxiv.org/abs/1408.3609">Prime numbers with a certain extremal type property</a>, arXiv:1408.3609 [math.NT], 2014. %p A246033 plist := [2,3] ; %p A246033 nlist := [1,2] ; %p A246033 p := 5 ; %p A246033 for n from 3 to 100000 do # experimental upper limit! %p A246033 plist := [op(plist),p] ; %p A246033 nlist := [op(nlist),n] ; %p A246033 doflat := true ; %p A246033 while doflat do %p A246033 doflat := false ; %p A246033 for nrew from nops(nlist)-1 to 2 by -1 do %p A246033 slopold := (nlist[nrew]-nlist[nrew-1])/(plist[nrew]-plist[nrew-1]) ; %p A246033 slop := (nlist[nrew+1]-nlist[nrew])/(plist[nrew+1]-plist[nrew]) ; %p A246033 if slop >= slopold then %p A246033 plist := subsop(nrew=NULL,plist) ; %p A246033 nlist := subsop(nrew=NULL,nlist) ; %p A246033 doflat := true ; %p A246033 end if; %p A246033 end do: %p A246033 end do: %p A246033 print(plist) ; %p A246033 p := nextprime(p) ; %p A246033 end do: # _R. J. Mathar_, Jul 28 2017 %t A246033 terms = 50; nmax0 = 25000; dnmax = 1000; Clear[f]; %t A246033 f[nmax_] := f[nmax] = Module[{}, plist = {2, 3}; nlist = {1, 2}; p = 5; %t A246033 For[n = 3, n <= nmax, n++, %t A246033 plist = Append[plist, p]; %t A246033 nlist = Append[nlist, n]; doflat = True; %t A246033 While[doflat, doflat = False; %t A246033 For[nrew = Length[nlist]-1, nrew >= 2, nrew--, slopold = (nlist[[nrew]] - nlist[[nrew-1]])/(plist[[nrew]] - plist[[nrew-1]]); slop = (nlist[[nrew+1]] - nlist[[nrew]])/(plist[[nrew+1]] - plist[[nrew]]); If [slop >= slopold, plist [[nrew]] = Nothing nlist[[nrew]] = Nothing; doflat = True]] %t A246033 ]; p = NextPrime[p] %t A246033 ]; PadRight[plist, terms] %t A246033 ]; %t A246033 f[nmax = nmax0]; f[nmax = nmax + dnmax]; %t A246033 While[Print[nmax]; f[nmax][[1 ;; terms]] != f[nmax - dnmax][[1 ;; terms]], nmax = nmax + dnmax]; %t A246033 f[nmax] (* _Jean-François Alcover_, Nov 01 2018, from _R. J. Mathar_'s Maple code *) %Y A246033 A different notion of convex prime is mentioned in A167844. %K A246033 nonn %O A246033 1,1 %A A246033 _Michel Marcus_ and _N. J. A. Sloane_, Aug 18 2014 %E A246033 a(14) corrected by Edward Tutaj and _Charles R Greathouse IV_, Nov 27 2014 %E A246033 Primes beyond 33647 from _R. J. Mathar_, Jul 28 2017