OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
Simply use the formula for the area of a triangle given the three sides.
EXAMPLE
For sides 5,7,11 the formula gives 12.96 and with rounding this becomes 13, a prime.
MAPLE
s:=proc(n) local a, b, c, p, A: a:=ithprime(n): b:=ithprime(n+1): c:=ithprime(n+2): p:=(a+b+c)/2: A:=sqrt(p*(p-a)*(p-b)*(p-c)): if isprime(round(A))=true then a else fi end: seq(s(n), n=1..700); # Emeric Deutsch, May 25 2007
Digits := 60 : isA106171 := proc(p) local q, r, s, area ; if isprime(p) then q := nextprime(p) ; r := nextprime(q) ; s := (p+q+r)/2 ; area := round(sqrt(s*(s-p)*(s-q)*(s-r))) ; RETURN(isprime(area)) ; else false ; fi ; end: for n from 1 to 900 do p := ithprime(n) : if isA106171(p) then printf("%d, ", p) ; fi ; od : # R. J. Mathar, Jun 08 2007
MATHEMATICA
arQ[{a_, b_, c_}]:=With[{s=(a+b+c)/2}, PrimeQ[Round[Sqrt[s(s-a)(s-b)(s-c)]]]]; Select[Partition[Prime[Range[600]], 3, 1], arQ][[;; , 1]] (* Harvey P. Dale, Jul 13 2025 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
J. M. Bergot, May 19 2007
EXTENSIONS
More terms from Emeric Deutsch and R. J. Mathar, May 25 2007
STATUS
approved
