login
Number of triangular regions in a "frame" of size n X n (see Comments in A331776 for definition), divided by 4.
3

%I #25 Mar 09 2020 22:03:42

%S 1,12,32,72,128,232,368,576,832,1232,1712,2328,3040,4040,5184,6616,

%T 8224,10248,12496,15144,18048,21688,25664,30184,35072,41000,47392,

%U 54608,62336,71088,80416,90864,101952,114832,128480,143352,159040,176984,195888,216424,237984,261624,286384,313184,341184,372496,405184

%N Number of triangular regions in a "frame" of size n X n (see Comments in A331776 for definition), divided by 4.

%C See A331776 for many other illustrations.

%C 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

%H Scott R. Shannon, <a href="/A331776/a331776.png">Colored illustration for a(3) = 32</a> (there are 4*32 triangles).

%p V := proc(m,n,q) local a,i,j; a:=0;

%p for i from 1 to m do for j from 1 to n do

%p if gcd(i,j)=q then a:=a+(m+1-i)*(n+1-j); fi; od: od: a; end;

%p f := n -> if n=1 then 4 else 8*n^2 + 16*n - 24 + 8*V(n,n,2); fi;

%p [seq(f(n)/4, n=1..60)]; # _N. J. A. Sloane_, Mar 09 2020

%Y Cf. A331761, A331776, A332594, A332596.

%K nonn

%O 1,2

%A _Scott R. Shannon_ and _N. J. A. Sloane_, Mar 02 2020

%E More terms from _N. J. A. Sloane_, Mar 09 2020