%I #12 Feb 10 2020 15:43:10
%S 0,0,0,5,14,27,52,85,126,197,284,387,534,705,900,1187,1514,1881,2328,
%T 2823,3366,4095,4896,5769,6818,7955,9180,10667,12266,13977,15928,
%U 18007,20214,22899,25752,28773,32114,35639,39348,43733,48350,53199,58544
%N a(n) = Sum_{-n<i<n, -n<j<n, gcd{i,j}=3} (n-|i|)*(n-|j|)/4.
%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. See p. 158.
%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 [seq(VR(n,n,3)/4,n=1..50)];
%Y This is A177720/2 and A331774/4.
%K nonn
%O 1,4
%A _N. J. A. Sloane_, Feb 08 2020