cp's OEIS Frontend

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.

A070150 Triangular areas of integer Heronian triangles.

Original entry on oeis.org

6, 36, 66, 120, 36, 120, 120, 210, 210, 120, 300, 210, 210, 300, 378, 630, 528, 780, 528, 210, 630, 630, 300, 1176, 780, 2016, 990, 1176, 2016, 2016, 1596, 780, 1770, 528, 300, 2850, 630, 2016, 780, 990, 3240, 2016, 630
Offset: 1

Views

Author

Reinhard Zumkeller, May 05 2002

Keywords

Comments

a(n) = A070086(A070148(n)).

Examples

			A070148(2)=368: [A070080(368), A070081(368), A070082(368)] = [9,10,17], area^2 = s*(s-9)*(s-10)*(s-17) with s=A070083(368)/2=(9+10+17)/2=18, area^2=18*9*8*1=16*81 is an integer square, therefore area=4*9=36=A000217(8).
		

Programs

  • Mathematica
    maxPerim = 300; maxSide = Floor[(maxPerim - 1)/2]; order[{a_, b_, c_}] := (a + b + c)*maxPerim^3 + a*maxPerim^2 + b*maxPerim + c; triangles = Reap[ Do[ If[ a + b + c <= maxPerim && c - b < a < c + b && b - a < c < b + a && c - a < b < c + a, Sow[{a, b, c}]], {a, 1, maxSide}, {b, a, maxSide}, {c, b, maxSide}]][[2, 1]]; stri = Sort[ triangles, order[#1] < order[#2] &]; area[{a_, b_, c_}] := With[{p = (a + b + c)/2}, Sqrt[p*(p - a)*(p - b)*(p - c)]]; triangularQ[n_] := IntegerQ[Sqrt[8*n + 1]]; area /@ Select[stri, IntegerQ[area[#]] && triangularQ[area[#]] &] (* Jean-François Alcover, Feb 22 2013 *)