This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A188158 #37 Feb 16 2025 08:33:14 %S A188158 6,12,24,30,36,42,48,54,60,66,72,84,90,96,108,114,120,126,132,144,150, %T A188158 156,168,180,192,198,204,210,216,234,240,252,264,270,288,294,300,306, %U A188158 324,330,336,360,378,384,390,396,408,420,432,456,462,468,480,486,504,510,522,528 %N A188158 Area A of the triangles such that A and the sides are integers. %C A188158 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). %C A188158 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 %H A188158 Giovanni Resta, <a href="/A188158/b188158.txt">Table of n, a(n) for n = 1..10000</a> %H A188158 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Triangle.html">Triangle</a> %H A188158 Wikipedia, <a href="https://en.wikipedia.org/wiki/Heronian_triangle">Heronian triangle</a> %e A188158 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. %p A188158 # storage of areas in T(i) %p A188158 T:=array(1..4000):nn:=100:k:=1:for a from 1 %p A188158 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 %p A188158 fi:od:od:od: %p A188158 # sort of T(i) %p A188158 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): %p A188158 # second program: %p A188158 isA188158 := proc(A::integer) %p A188158 local Asqr, s,a,b,c ; %p A188158 Asqr := A^2 ; %p A188158 for s in numtheory[divisors](Asqr) do %p A188158 if s^2> A then %p A188158 for a from 1 to s-1 do %p A188158 if modp(Asqr,s-a) = 0 then %p A188158 for b from a to s-1 do %p A188158 c := 2*s-a-b ; %p A188158 if s*(s-a)*(s-b)*(s-c) = Asqr then %p A188158 return true ; %p A188158 end if; %p A188158 end do: %p A188158 end if; %p A188158 end do: %p A188158 end if; %p A188158 end do: %p A188158 false ; %p A188158 end proc: %p A188158 for n from 3 to 600 do %p A188158 if isA188158(n) then %p A188158 printf("%d,\n",n) ; %p A188158 end if; %p A188158 end do: # _R. J. Mathar_, May 02 2018 %t A188158 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 *) %Y A188158 Cf. A007237, A009112, A024153, A024365, A051516, A051584, A051585, A055592, A055593, A055594, A055595. %K A188158 nonn %O A188158 1,1 %A A188158 _Michel Lagneau_, Mar 22 2011