

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




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^4q^4r^4)/(2*p).


LINKS

Table of n, a(n) for n=1..8.


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^4q^4r^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, 1w);
if is(w < bestw) then
bestw:= w;
R:= R, p;
fi;
od:
R;


CROSSREFS

Sequence in context: A262962 A321367 A121976 * A293598 A243179 A207459
Adjacent sequences: A339786 A339787 A339788 * A339790 A339791 A339792


KEYWORD

nonn,more


AUTHOR

J. M. Bergot and Robert Israel, Dec 16 2020


STATUS

approved



