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.

A239246 Number of primitive Heronian triangles with n as greatest side length.

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 2, 0, 2, 0, 3, 0, 0, 2, 2, 0, 0, 1, 3, 2, 0, 1, 2, 3, 0, 0, 0, 0, 2, 1, 5, 0, 4, 3, 4, 1, 0, 2, 1, 0, 0, 2, 0, 2, 4, 6, 4, 0, 2, 2, 0, 2, 0, 1, 3, 0, 1, 0, 8, 2, 0, 5, 1, 2, 0, 0, 6, 2, 7, 0, 3, 0, 0, 3, 0, 2, 0, 0, 9
Offset: 1

Views

Author

Frank M Jackson, Mar 13 2014

Keywords

Examples

			a(17)=3 as there are 3 primitive Heronian triangles with greatest side length of 17. They are (9, 10, 17), (8, 15, 17) and (16, 17, 17).
		

Crossrefs

Programs

  • Mathematica
    nn=200; lst={}; Do[s=(a+b+c)/2; If[IntegerQ[s]&&GCD[a, b, c]==1, area2=s(s-a)(s-b)(s-c); If[area2>0&&IntegerQ[Sqrt[area2]], AppendTo[lst, c]]], {c, 3, nn}, {b, c}, {a, b}]; Table[Length@Select[lst, #==n &], {n, 1, nn}] (* using T. D. Noe's program at A083875 *)