A246033 "Convex" primes: extremal primes in the sense of Tutaj.
2, 3, 7, 19, 47, 73, 113, 199, 283, 467, 661, 887, 1129, 1327, 1627, 2803, 3947, 4297, 5881, 6379, 7043, 9949, 10343, 13187, 15823, 18461, 24137, 33647, 34763, 37663, 42863, 43067, 59753, 59797, 82619, 96017, 102679, 129643, 130699, 142237, 155893, 187477, 194119
Offset: 1
Keywords
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..500
- Nathan McNew, The Most Frequent Values of the Largest Prime Divisor Function, Exper. Math., 2017, Vol. 26, No. 2, 210-224; also arXiv:1504.05985 [math.NT], 2015.
- Carl Pomerance, The Prime Number Graph, Mathematics of Computations, Volume 33, 145, January 1979, pages 399-408.
- Edward Tutaj, Prime numbers with a certain extremal type property, arXiv:1408.3609 [math.NT], 2014.
Crossrefs
A different notion of convex prime is mentioned in A167844.
Programs
-
Maple
plist := [2,3] ; nlist := [1,2] ; p := 5 ; for n from 3 to 100000 do # experimental upper limit! plist := [op(plist),p] ; nlist := [op(nlist),n] ; doflat := true ; while doflat do doflat := false ; for nrew from nops(nlist)-1 to 2 by -1 do 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 then plist := subsop(nrew=NULL,plist) ; nlist := subsop(nrew=NULL,nlist) ; doflat := true ; end if; end do: end do: print(plist) ; p := nextprime(p) ; end do: # R. J. Mathar, Jul 28 2017
-
Mathematica
terms = 50; nmax0 = 25000; dnmax = 1000; Clear[f]; f[nmax_] := f[nmax] = Module[{}, plist = {2, 3}; nlist = {1, 2}; p = 5; For[n = 3, n <= nmax, n++, plist = Append[plist, p]; nlist = Append[nlist, n]; doflat = True; While[doflat, doflat = False; 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]] ]; p = NextPrime[p] ]; PadRight[plist, terms] ]; f[nmax = nmax0]; f[nmax = nmax + dnmax]; While[Print[nmax]; f[nmax][[1 ;; terms]] != f[nmax - dnmax][[1 ;; terms]], nmax = nmax + dnmax]; f[nmax] (* Jean-François Alcover, Nov 01 2018, from R. J. Mathar's Maple code *)
Extensions
a(14) corrected by Edward Tutaj and Charles R Greathouse IV, Nov 27 2014
Primes beyond 33647 from R. J. Mathar, Jul 28 2017
Comments