%I #9 Dec 04 2025 22:40:35
%S 24,30,60,84,120,150,180,210,216,240,270,330,384,480,540,546,600,630,
%T 726,750,756,840,864,924,960,990,1080,1224,1320,1350,1386,1470,1560,
%U 1620,1710,1716,1920,2016,2100,2184,2310,2400,2430,2574,2646,2730,2904,2970,3000,3174,3456,3570,3630,3696
%N Areas of Pythagorean triangles that are sums of two or more consecutive primes.
%H Robert Israel, <a href="/A391131/b391131.txt">Table of n, a(n) for n = 1..2000</a>
%e a(3) = 60 is a term because 60 = (15*8)/2 is the area of the Pythagorean triangle with sides 8, 15, 17, and 60 = 29 + 31 is the sum of two consecutive primes.
%p N:= 5000: # 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 P:= select(isprime,[2,seq(i,i=3..N/2,2)]):
%p SP:= ListTools:-PartialSums([0,op(P),nextprime(P[-1])]):
%p C:= {}:
%p for i from 1 to nops(SP)-2 do
%p for j from i+2 to nops(SP) do
%p x:= SP[j]-SP[i];
%p if x > N then break fi;
%p if member(x,A) then C:= C union {x} fi;
%p od od:
%p sort(convert(C,list));
%Y Intersection of A009112 and A050936. Cf. A383395.
%K nonn
%O 1,1
%A _Will Gosnell_ and _Robert Israel_, Nov 29 2025