|
|
A246033
|
|
"Convex" primes: extremal primes in the sense of Tutaj.
|
|
4
|
|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
See Tutaj (2014) for the precise definition.
|
|
LINKS
|
Carl Pomerance, The Prime Number Graph, Mathematics of Computations, Volume 33, 145, January 1979, pages 399-408.
|
|
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) ;
|
|
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];
|
|
CROSSREFS
|
A different notion of convex prime is mentioned in A167844.
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|