A188158 Area A of the triangles such that A and the sides are integers.
6, 12, 24, 30, 36, 42, 48, 54, 60, 66, 72, 84, 90, 96, 108, 114, 120, 126, 132, 144, 150, 156, 168, 180, 192, 198, 204, 210, 216, 234, 240, 252, 264, 270, 288, 294, 300, 306, 324, 330, 336, 360, 378, 384, 390, 396, 408, 420, 432, 456, 462, 468, 480, 486, 504, 510, 522, 528
Offset: 1
Keywords
Examples
a(3) = 24 because the area of the triangle whose sides are 4, 15, 13 is given by sqrt(p(p-4)(p-15)(p-13)) = 24, where p = (4 + 15 + 13)/2 = 16.
Links
- Giovanni Resta, Table of n, a(n) for n = 1..10000
- Eric Weisstein's World of Mathematics, Triangle
- Wikipedia, Heronian triangle
Crossrefs
Programs
-
Maple
# storage of areas in T(i) T:=array(1..4000):nn:=100:k:=1:for a from 1 to nn do: for b from 1 to nn do: for c from 1 to nn do: p:=(a+b+c)/2 : x:=p*(p-a)*(p-b)*(p-c): if x>0 then x1:=abs(x):s:=sqrt(x1) :else fi:if s=floor(s) then T[k]:=s:k:=k+1:else fi:od:od:od: # sort of T(i) for jj from 1 to k-1 do: ii:=jj:for k1 from ii+1 to k-1 do:if T[ii]>T[k1] then ii:=k1:else fi:od: m:=T[jj]:T[jj]:=T[ii]:T[ii]:=m:od:liste:=convert(T,set):print(liste): # second program: isA188158 := proc(A::integer) local Asqr, s,a,b,c ; Asqr := A^2 ; for s in numtheory[divisors](Asqr) do if s^2> A then for a from 1 to s-1 do if modp(Asqr,s-a) = 0 then for b from a to s-1 do c := 2*s-a-b ; if s*(s-a)*(s-b)*(s-c) = Asqr then return true ; end if; end do: end if; end do: end if; end do: false ; end proc: for n from 3 to 600 do if isA188158(n) then printf("%d,\n",n) ; end if; end do: # R. J. Mathar, May 02 2018
-
Mathematica
nn = 528; lst = {}; Do[s = (a + b + c)/2; If[IntegerQ[s], area2 = s (s - a) (s - b) (s - c); If[0 < area2 <= nn^2 && IntegerQ[Sqrt[area2]], AppendTo[lst, Sqrt[area2]]]], {a, nn}, {b, a}, {c, b}]; Union[lst] (* T. D. Noe, Mar 23 2011 *)
Comments