login
A triangle with sides that are three consecutive integers has an area that is a prime after rounding. The first of the consecutive numbers gives the sequence.
0

%I #10 Aug 08 2015 21:46:18

%S 2,11,14,17,29,31,40,47,48,94,96,98,106,111,116,118,126,144,171,172,

%T 173,178,179,188,206,216,237,238,245,246,261,265,282,284,298,317,320,

%U 326,355,366,371,376,428,442,470,496,556,560,562,570,587,605,609,613,620

%N A triangle with sides that are three consecutive integers has an area that is a prime after rounding. The first of the consecutive numbers gives the sequence.

%F Simply pass three consecutive integers through the formula that gives the area of a triangle from the three sides.

%e For triangle of sides 17,18,19 the formula gives 139.4 and this rounds to a prime.

%p Digits := 60 : isA106660 := proc(p) local q,r,s,area ; q := p+1 ; r := q+1 ; s := (p+q+r)/2 ; area := round(sqrt(s*(s-p)*(s-q)*(s-r))) ; RETURN(isprime(area)) ; end: for n from 1 to 900 do if isA106660(n) then printf("%d,",n) ; fi ; od : # _R. J. Mathar_, Jun 08 2007

%t With[{c=Sqrt[3]/4},Select[Range[700],PrimeQ[Floor[1/2+c Sqrt[#^2 (#^2-4)]]]&] -1] (* _Harvey P. Dale_, Oct 25 2011 *)

%K nonn

%O 1,1

%A _J. M. Bergot_, May 19 2007

%E Corrected and extended by _R. J. Mathar_, Jun 08 2007