%I #30 Oct 19 2023 12:50:29
%S 0,1,6,2,13,28,3,22,49,86,4,33,74,131,200,5,46,105,188,289,418,6,61,
%T 140,251,386,559,748,7,78,181,326,503,730,979,1282,8,97,226,409,632,
%U 919,1234,1617,2040,9,118,277,502,777,1132,1521,1994,2517,3106,10,141,332,603,934,1361,1828,2397,3026,3735,4492
%N Triangle read by rows: T(m,n) = Sum_{-m<i<m, -n<j<n, gcd{i,j}=1} (m-|i|)*(n-|j|)/2, m >= n >= 1.
%C This is the triangle in A332350, halved.
%C This triangle is the lower half of the array defined in A115009.
%D Jovisa Zunic, Note on the number of two-dimensional threshold functions, SIAM J. Discrete Math. Vol. 25 (2011), No. 3, pp. 1266-1268. See Equation (1.2).
%H Paolo Xausa, <a href="/A332351/b332351.txt">Table of n, a(n) for n = 1..11325</a> (rows 1..150 of the triangle, flattened)
%H M. A. Alekseyev, M. Basova, and N. Yu. Zolotykh. <a href="https://doi.org/10.1137/140978090">On the minimal teaching sets of two-dimensional threshold functions</a>. SIAM Journal on Discrete Mathematics 29:1 (2015), 157-165. doi:10.1137/140978090. This sequence is f_1(m,n)/2.
%e Triangle begins:
%e 0,
%e 1, 6,
%e 2, 13, 28,
%e 3, 22, 49, 86,
%e 4, 33, 74, 131, 200,
%e 5, 46, 105, 188, 289, 418,
%e 6, 61, 140, 251, 386, 559, 748,
%e 7, 78, 181, 326, 503, 730, 979, 1282,
%e 8, 97, 226, 409, 632, 919, 1234, 1617, 2040,
%e 9, 118, 277, 502, 777, 1132, 1521, 1994, 2517, 3106,
%e ...
%p VR := proc(m,n,q) local a,i,j; a:=0;
%p for i from -m+1 to m-1 do for j from -n+1 to n-1 do
%p if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
%p for m from 1 to 12 do lprint(seq(VR(m,n,1)/2,n=1..m),); od:
%t A332351[m_,n_]:=Sum[If[CoprimeQ[i,j],2(m-i)(n-j),0],{i,m-1},{j,n-1}]+2m*n-m-n;Table[A332351[m,n],{m,15},{n,m}] (* _Paolo Xausa_, Oct 18 2023 *)
%Y The main diagonal is A141255, or A114043 - 1.
%Y Cf. A115009, A332350, A332352.
%Y This is the lower triangle of the array in A115009.
%K nonn,tabl
%O 1,3
%A _N. J. A. Sloane_, Feb 10 2020