OFFSET
1,3
COMMENTS
LINKS
Robert Israel, Table of n, a(n) for n = 1..10020 (rows 1 to 261, flattened)
FORMULA
The area of the triangle with vertices (p,p), (s,r-s), (q,q) is (q-p)*|p+q-4*s|/4.
EXAMPLE
With p=A098058(5)=17, q=19, r=18, the values of s are 5, 7, 11, 13, corresponding to areas 4, 8, 8, 4 respectively, so row 4 is (4,8).
The first 10 rows are
0
0
2
4, 8
0, 36, 60
4, 8, 16
0, 36, 72, 84
4, 16, 20, 32
36, 72, 108, 132
54, 90, 150
MAPLE
R:= 0: count:= 1: q:= 5: nrows:= 1:
printf("0\n"):
while nrows < 20 do
p:= q; q:= nextprime(q);
if p+q mod 4 <> 0 then next fi;
nrows:= nrows+1;
r:= (p+q)/2;
T:= select(t -> isprime(t) and isprime(r-t), [$ceil(r/2)..r]);
count:= count + nops(T);
V:= map(t -> abs((p-q)*(p+q-4*t)/4), T);
R:= R, op(V);
printf("%a\n", V);
od:
CROSSREFS
KEYWORD
AUTHOR
J. M. Bergot and Robert Israel, Dec 03 2020
STATUS
approved