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 A331774 #14 Feb 10 2020 15:43:03 %S A331774 0,0,0,20,56,108,208,340,504,788,1136,1548,2136,2820,3600,4748,6056, %T A331774 7524,9312,11292,13464,16380,19584,23076,27272,31820,36720,42668, %U A331774 49064,55908,63712,72028,80856,91596,103008,115092,128456,142556,157392,174932,193400 %N A331774 a(n) = Sum_{-n<i<n, -n<j<n, gcd{i,j}=3} (n-|i|)*(n-|j|). %H A331774 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 A331774 VR := proc(m,n,q) local a,i,j; a:=0; %p A331774 for i from -m+1 to m-1 do for j from -n+1 to n-1 do %p A331774 if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end; %p A331774 [seq(VR(n,n,3),n=1..50)]; %Y A331774 This is twice A177720 and 4 times A331775. %K A331774 nonn %O A331774 1,4 %A A331774 _N. J. A. Sloane_, Feb 08 2020