OFFSET
1,2
COMMENTS
It appears that the area is rational only for n=1.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = round(sqrt(s*(s-prime(n))*(s-prime(n+1))*(s-prime(n+2)))) where s = (prime(n)+prime(n+1)+prime(n+2))/2.
a(n) = round(sqrt((3/16)*A330096(n))). - Hugo Pfoertner, Oct 19 2020
EXAMPLE
a(3)=13 because the third, fourth and fifth primes are 5,7,11, the area of a triangle with sides 5, 7, 11 is 3*sqrt(299)/4, and the nearest integer to that is 13.
MAPLE
atr:= proc(p, q, r) local s; s:= (p+q+r)/2; sqrt(s*(s-p)*(s-q)*(s-r)) end proc:
P:= [seq(ithprime(i), i=1..102)]:
seq(round(atr(P[i], P[i+1], P[i+2])), i=1..100);
MATHEMATICA
aTr[{a_, b_, c_}]:=Module[{s=(a+b+c)/2}, Round[Sqrt[s(s-a)(s-b)(s-c)]]]; aTr/@Partition[Prime[ Range[ 60]], 3, 1] (* Harvey P. Dale, Dec 14 2023 *)
PROG
(Python)
from sympy import prime, integer_nthroot
def A338267(n):
p, q, r = prime(n)**2, prime(n+1)**2, prime(n+2)**2
return (integer_nthroot(4*p*q-(p+q-r)**2, 2)[0]+2)//4 # Chai Wah Wu, Oct 19 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Oct 19 2020
STATUS
approved