%I #84 Sep 25 2023 10:34:56
%S 6,24,30,54,60,84,96,120,150,180,210,216,240,270,294,330,336,384,480,
%T 486,504,540,546,600,630,720,726,750,756,840,864,924,960,990,1014,
%U 1080,1176,1224,1320,1344,1350,1386,1470,1500,1536,1560,1620,1710,1716,1734,1890
%N Areas of Pythagorean triangles: numbers which can be the area of a right triangle with integer sides.
%C Number of terms < 10^k for increasing values of k: 1, 7, 34, 150, 636, 2536, 9757, 35987, 125350, 407538, ..., .
%C All terms are divisible by 6.
%C Also positive integers m with four (or more) different divisors (p, q, r, s) such that m = p*q = r*s and s = p+q+r. - _Jose Aranda_, Jun 28 2023
%H Robert Israel, <a href="/A009112/b009112.txt">Table of n, a(n) for n = 1..10000</a>
%H Ron Knott, <a href="http://www.maths.surrey.ac.uk/hosted-sites/R.Knott/Pythag/pythag.html#periarea">Pythagorean Triangles</a>
%H B. Miller, <a href="http://www.jstor.org/stable/27962235">Nasty Numbers</a>, The Mathematics Teacher 73 (1980), page 649.
%H Supriya Mohanty and S. P. Mohanty, <a href="http://www.fq.math.ca/Scanned/28-1/mohanty.pdf">Pythagorean Numbers</a>, Fibonacci Quarterly 28 (1990), 31-42.
%e 30 belongs to the sequence as the area of the triangle (5,12,13) is 30.
%e 6 is in the sequence because it is the area of the 3-4-5 triangle.
%p N:= 10^4: # to get all entries <= N
%p A:= {}:
%p for t from 1 to floor(sqrt(2*N)) do
%p F:= select(f -> f[2]::odd,ifactors(2*t)[2]);
%p d:= mul(f[1],f=F);
%p for e from ceil(sqrt(t/d)) do
%p s:= d*e^2;
%p r:= sqrt(2*t*s);
%p a:= (r+s)*(r+t)/2;
%p if a > N then break fi;
%p A:= A union {a};
%p od
%p od:
%p A;
%p # if using Maple 11 or earlier, uncomment the next line
%p # sort(convert(A,list)); # _Robert Israel_, Apr 06 2015
%t lst = {}; Do[ If[ IntegerQ[c = Sqrt[a^2 + b^2]], AppendTo[lst, a*b/2]; lst = Union@ lst], {a, 4, 180}, {b, a - 1, Floor[ Sqrt[a]], -1}]; Take[lst, 51] (* _Vladimir Joseph Stephan Orlovsky_, Nov 23 2010 *)
%t g@A_ := With[{div = Divisors@(2*A)}, AnyTrue[Sqrt@(Plus@@({#, 2*A/#}^2))& /@Take[div, Floor[(Length@div)/2]],IntegerQ]];
%t Select[Range@5000, g@# &] (* _Hans Rudolf Widmer_, Sep 25 2023 *)
%o (PARI) is_A009112(n)={ my(N=1+#n=divisors(2*n)); for( i=1, N\2, issquare(n[i]^2+n[N-i]^2) & return(1)) } \\ _M. F. Hasler_, Dec 09 2010
%o (Sage) is_A009112 = lambda n: any(is_square(a**2+(2*n/a)**2) for a in divisors(2*n)) # _D. S. McNeil_, Dec 09 2010
%Y Union of A009111, A009127, A024365, A177021.
%Y A073120 is a subsequence.
%Y See A256418 for the numbers 4*a(n).
%K nonn,easy
%O 1,1
%A _David W. Wilson_
|