%I #24 Apr 19 2020 07:53:27
%S 0,2,12,4,26,56,6,44,98,172,8,66,148,262,400,10,92,210,376,578,836,12,
%T 122,280,502,772,1118,1496,14,156,362,652,1006,1460,1958,2564,16,194,
%U 452,818,1264,1838,2468,3234,4080,18,236,554,1004,1554,2264,3042,3988,5034,6212
%N Triangle read by rows: T(m,n) = Sum_{-m<i<m, -n<j<n, gcd{i,j}=1} (m-|i|)*(n-|j|), m >= n >= 1.
%H Max A. Alekseyev, <a href="https://arxiv.org/abs/math/0602511">On the number of two-dimensional threshold functions</a>, arXiv:math/0602511 [math.CO], 2006-2010; SIAM J. Disc. Math. 24(4), 2010, pp. 1617-1631. doi:10.1137/090750184. See N(m,n) in Theorem 2.
%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).
%e Triangle begins:
%e 0,
%e 2, 12,
%e 4, 26, 56,
%e 6, 44, 98, 172,
%e 8, 66, 148, 262, 400,
%e 10, 92, 210, 376, 578, 836,
%e 12, 122, 280, 502, 772, 1118, 1496,
%e 14, 156, 362, 652, 1006, 1460, 1958, 2564,
%e 16, 194, 452, 818, 1264, 1838, 2468, 3234, 4080,
%e 18, 236, 554, 1004, 1554, 2264, 3042, 3988, 5034, 6212,
%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),n=1..m),); od:
%t T[m_, n_] := Sum[Boole[GCD[i, j] == 1] (m - Abs[i]) (n - Abs[j]), {i, -m + 1, m - 1}, {j, -n + 1, n - 1}];
%t Table[T[m, n], {m, 1, 12}, {n, 1, m}] // Flatten (* _Jean-François Alcover_, Apr 19 2020 *)
%Y The main diagonal is A331771.
%Y Cf. A332351, A332352.
%K nonn,tabl
%O 1,2
%A _N. J. A. Sloane_, Feb 10 2020