login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A339789
Odd primes p such that h(p) sets a record for closeness to the nearest integer, where h(p) is the altitude of a triangle with base p and other two sides the next two primes after p.
0
3, 5, 7, 11, 249533, 290531, 350783, 935201
OFFSET
1,1
COMMENTS
If q and r are the next two primes after p, h(p) = sqrt(2*(p^2*q^2+p^2*r^2+q^2*r^2)-p^4-q^4-r^4)/(2*p).
EXAMPLE
The first three odd primes are 3, 5, 7, 11, with h(3) ~= 4.330127020,
h(5) ~= 5.187484941 (closer to 5 than h(3) is to 4), h(7) ~= 10.99976809 (closer to 11 than h(5) is to 5), h(11) ~= 12.99992053 (closer to 13 than h(7) is to 11). Thus a(1) to a(4) are 3, 5, 7, 11. After that the values are all farther from their nearest integers than h(11) is to 13 until 249533: h(249533) ~= 216109.99994158 is closer to 216110 than is h(11) to 13.
MAPLE
H:= (p, q, r) -> sqrt(2*(p^2*q^2+p^2*r^2+q^2*r^2)-p^4-q^4-r^4)/(2*p):
q:= 3: r:= 5: bestw:= 1: R:= NULL:
while r < 10^6 do
p:= q; q:= r; r:= nextprime(r);
v:= H(p, q, r);
w:= frac(v); w:= min(w, 1-w);
if is(w < bestw) then
bestw:= w;
R:= R, p;
fi;
od:
R;
CROSSREFS
Sequence in context: A262962 A321367 A121976 * A293598 A243179 A207459
KEYWORD
nonn,more
AUTHOR
J. M. Bergot and Robert Israel, Dec 16 2020
STATUS
approved