login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A188158
Area A of the triangles such that A and the sides are integers.
62
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,1
COMMENTS
The area A of a triangle whose sides have lengths a, b, and c is given by Heron's formula: A = sqrt(s*(s-a)*(s-b)*(s-c)), where s = (a+b+c)/2. A given area often corresponds to more than one triangle; for example, a(9) = 60 for the triangles (a,b,c) = (6,25,29), (8,17,15), (13,13,10) and (13,13,24).
If only primitive integer triangles (that is, the lengths of the sides are coprime) are considered, then the possible areas are 6 times the terms in A083875. - T. D. Noe, Mar 23 2011
LINKS
Eric Weisstein's World of Mathematics, Triangle
EXAMPLE
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.
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 *)
KEYWORD
nonn
AUTHOR
Michel Lagneau, Mar 22 2011
STATUS
approved