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.

A227003 Number of primitive Heronian triangles with area 6n.

This page as a plain text file.
%I A227003 #14 Jun 27 2013 13:46:14
%S A227003 1,2,0,1,1,2,1,0,0,4,1,1,0,4,2,0,0,0,1,3,3,1,0,0,0,2,0,3,0,2,0,0,1,1,
%T A227003 6,1,0,0,1,1,0,3,0,2,1,0,0,1,0,2,1,0,0,0,4,4,0,0,0,3,0,0,0,0,1,3,0,1,
%U A227003 0,15,0,0,0,0,0,3,2,1,0,1,0,0,0,3,2,0,1,2,0,0
%N A227003 Number of primitive Heronian triangles with area 6n.
%C A227003 The Mathematica program captures all primitive Heronian areas up to 540 by searching through integer triangles with a longest side ranging from 3 to at least 484. This upper limit for the longest side is determined by observing that the shortest side of a Heronian triangle is >= 3 and the smallest area of an integer triangle with longest side z and shortest side 3 is generated by the integer triple (3, z-2, z).
%e A227003 a(10) = 4 as there are 4 primitive Heronian triangles with area 60. The triples are (10,13,13), (8,15,17), (13,13,24), (6,25,29).
%t A227003 nn=540; 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, Sqrt[area2]]]], {a, 3, nn}, {b, a}, {c, b}]; lst1=Sort@lst/6; Table[Length@Select[lst1, n==# &], {n, 1, nn/6}] (* using _T. D. Noe_'s program A083875 *)
%o A227003 (PARI) a(n)=sum(z=sqrtint(sqrtint(192*n^2)-1)+1,sqrtint(9*(64*n^2+5)\20), sum(y=z\2+1,z, my(t=(y*z)^2-(12*n)^2,x,g=gcd(y,z)); if(issquare(t,&t), (issquare(y^2+z^2-2*t,&x) && gcd(x,g)==1 && x<=y) + (t && issquare(y^2+z^2+2*t,&x) && gcd(x,g)==1 && x<=y), 0))) \\ _Charles R Greathouse IV_, Jun 27 2013
%Y A227003 Cf. A051585, A083875.
%K A227003 nonn
%O A227003 1,2
%A A227003 _Frank M Jackson_, Jun 26 2013