This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A331775 #12 Feb 10 2020 15:43:10 %S A331775 0,0,0,5,14,27,52,85,126,197,284,387,534,705,900,1187,1514,1881,2328, %T A331775 2823,3366,4095,4896,5769,6818,7955,9180,10667,12266,13977,15928, %U A331775 18007,20214,22899,25752,28773,32114,35639,39348,43733,48350,53199,58544 %N A331775 a(n) = Sum_{-n<i<n, -n<j<n, gcd{i,j}=3} (n-|i|)*(n-|j|)/4. %H A331775 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 A331775 VR := proc(m,n,q) local a,i,j; a:=0; %p A331775 for i from -m+1 to m-1 do for j from -n+1 to n-1 do %p A331775 if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end; %p A331775 [seq(VR(n,n,3)/4,n=1..50)]; %Y A331775 This is A177720/2 and A331774/4. %K A331775 nonn %O A331775 1,4 %A A331775 _N. J. A. Sloane_, Feb 08 2020