OFFSET
1,2
COMMENTS
See A331776 for many other illustrations.
Theorem. Let z_2(n) = Sum_{i, j = 1..n, gcd(i,j)=2} (n+1-i)*(n+1-j) (this is A331761). Then, for n >= 2, a(n) = 2*(z_2(n) + (n+3)*(n-1)). - Scott R. Shannon and N. J. A. Sloane, Mar 06 2020
LINKS
Scott R. Shannon, Colored illustration for a(3) = 32 (there are 4*32 triangles).
MAPLE
V := proc(m, n, q) local a, i, j; a:=0;
for i from 1 to m do for j from 1 to n do
if gcd(i, j)=q then a:=a+(m+1-i)*(n+1-j); fi; od: od: a; end;
f := n -> if n=1 then 4 else 8*n^2 + 16*n - 24 + 8*V(n, n, 2); fi;
[seq(f(n)/4, n=1..60)]; # N. J. A. Sloane, Mar 09 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Scott R. Shannon and N. J. A. Sloane, Mar 02 2020
EXTENSIONS
More terms from N. J. A. Sloane, Mar 09 2020
STATUS
approved