OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..2000
EXAMPLE
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.
MAPLE
N:= 5000: # to get all entries <= N
A:= {}:
for t from 1 to floor(sqrt(2*N)) do
F:= select(f -> f[2]::odd, ifactors(2*t)[2]);
d:= mul(f[1], f=F);
for e from ceil(sqrt(t/d)) do
s:= d*e^2;
r:= sqrt(2*t*s);
a:= (r+s)*(r+t)/2;
if a > N then break fi;
A:= A union {a};
od
od:
P:= select(isprime, [2, seq(i, i=3..N/2, 2)]):
SP:= ListTools:-PartialSums([0, op(P), nextprime(P[-1])]):
C:= {}:
for i from 1 to nops(SP)-2 do
for j from i+2 to nops(SP) do
x:= SP[j]-SP[i];
if x > N then break fi;
if member(x, A) then C:= C union {x} fi;
od od:
sort(convert(C, list));
CROSSREFS
KEYWORD
nonn
AUTHOR
Will Gosnell and Robert Israel, Nov 29 2025
STATUS
approved
