|
|
A339096
|
|
Record values in A306400.
|
|
0
|
|
|
5, 7, 11, 23, 701, 3989, 4397, 5501, 7309, 9281, 10331, 11243, 12907, 16127, 27917, 39901, 43051, 44843, 48397, 66569, 70657
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
a(3) = 11 is in the sequence because A306400(5) = 11 and A306400(k)<11 for k < 5.
|
|
MAPLE
|
g:= proc(p) local q;
q:= 3:
do
q:= nextprime(q);
if isprime(p+q^2-1) and isprime(p+q^2+1) then return q fi;
od
end proc:
R:= NULL: count:= 0: w:= 0:
for nn from 5 by 6 while count < 15 do
if isprime(nn) then
v:= g(nn);
if v > w then count:= count+1; R:= R, v; w:= v; fi
fi
od:
R;
|
|
MATHEMATICA
|
g[p_] := Module[{q}, q = 3; While[True, q = NextPrime[q]; If [PrimeQ[p + q^2 - 1] && PrimeQ[p + q^2 + 1], Return@q]]];
R = {}; count = 0; w = 0;
For[nn = 5, count < 15, nn = nn + 6, If[PrimeQ[nn], v = g[nn]; If[v > w, count++; Print[count, " ", v]; R = Append[R, v]; w = v]]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|