The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338262 Primes p such that the area of the triangle with sides p and the next two primes achieves a record for closeness to a prime. 2
2, 3, 5, 239, 2521, 12239, 121421, 869657, 23638231, 30656909, 47964149, 48203291, 57273361, 552014783, 754751369, 941234383 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(3)=5 is in the sequence because 5 is a prime, the triangle with sides 5, 7, 11 has area 3*sqrt(299)/4 whose distance to the nearest prime, 13, is approximately 0.0313, and this is less than any distance previously achieved.
MAPLE
atr:= proc(p, q, r) local s; s:= (p+q+r)/2; sqrt(s*(s-p)*(s-q)*(s-r)) end proc:
R:= 2, 3: p:= 3: q:= 5: r:= 7: count:= 2: dmin:= 7 - atr(3, 5, 7):
while count < 8 do
p:= q: q:= r: r:= nextprime(r);
a:= atr(p, q, r);
m:= round(a);
if not isprime(m) then next fi;
d:= abs(a-m);
if is(d < dmin) then
count:= count+1;
dmin:= d;
R:= R, p;
fi
od:
R;
PROG
(PARI) lista(nn) = {my(m=p=3, q=5, s, t); print1(2); forprime(r=7, nn, s=sqrt((p-s=(p+q+r)/2)*(q-s)*(s-r)*s); if(m>t=min(s-precprime(s), nextprime(s)-s), print1(", ", p); m=t); p=q; q=r); } \\ Jinyuan Wang, Oct 24 2020
CROSSREFS
Sequence in context: A082755 A042067 A333803 * A042579 A033090 A303371
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Oct 19 2020
EXTENSIONS
a(10)-a(16) from Jinyuan Wang, Oct 24 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 17 12:26 EDT 2024. Contains 372600 sequences. (Running on oeis4.)