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 A332361 #18 Feb 12 2020 01:05:59 %S A332361 3,4,6,5,9,14,6,13,22,36,7,18,31,52,76,8,24,43,74,110,160,9,31,56,97, %T A332361 144,210,276,10,39,72,126,188,275,363,478,11,48,89,157,235,345,456, %U A332361 601,756,12,58,109,193,290,427,565,745,938,1164,13,69,130,231,347,511,675,890,1120,1390,1660 %N A332361 Consider a partition of the triangle with vertices (0, 0), (1, 0), (0, 1) by the lines a_1*x_1 + a_2*x_2 = 1, where (x_1, x_2) is in {1, 2,...,m} X {1, 2,...,n}, m >= 1, n >= 1. Triangle read by rows: T(m,n) = number of vertices in the partition, for m >= n >= 1. %H A332361 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 Theorem 13. %H A332361 N. J. A. Sloane, <a href="/A332357/a332357.pdf">Illustration for (m,n) = (2,2), (3,1), (3,2), (3,3)</a> [c_3 = number of triangles, c_4 = number of quadrilaterals; c, e, v = numbers of cells, edges, vertices] %F A332361 T(m,n) = A332359(m,n) - A332357(m,n) + 1 (Euler's formula). %e A332361 Triangle begins: %e A332361 3, %e A332361 4, 6, %e A332361 5, 9, 14, %e A332361 6, 13, 22, 36, %e A332361 7, 18, 31, 52, 76, %e A332361 8, 24, 43, 74, 110, 160, %e A332361 9, 31, 56, 97, 144, 210, 276, %e A332361 10, 39, 72, 126, 188, 275, 363, 478, %e A332361 11, 48, 89, 157, 235, 345, 456, 601, 756, %e A332361 12, 58, 109, 193, 290, 427, 565, 745, 938, 1164, %e A332361 ... %p A332361 VR := proc(m,n,q) local a,i,j; a:=0; %p A332361 for i from -m+1 to m-1 do for j from -n+1 to n-1 do %p A332361 if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end; %p A332361 ct3 := proc(m,n) local i; global VR; %p A332361 if m=1 or n=1 then max(m,n) else VR(m,n,2)/2+m+n+1; fi; end; # A332354 %p A332361 ct4 := proc(m,n) local i; global VR; %p A332361 if m=1 or n=1 then 0 else VR(m,n,1)/4-VR(m,n,2)/2-m/2-n/2-1; fi; end; # A332356 %p A332361 ct := (m,n) -> ct3(m,n) + ct4(m,n); # A332357 %p A332361 cte := proc(m,n) local i; global VR; %p A332361 if m=1 or n=1 then 2*max(m,n)+1 else VR(m,n,1)/2-VR(m,n,2)/4+m+n; fi; end; # A332359 %p A332361 ctv := (m,n) -> cte(m,n) - ct(m,n) + 1; # A332361 %p A332361 for m from 1 to 12 do lprint([seq(ctv(m,n),n=1..m)]); od: %Y A332361 Cf. A332350-A331360. %Y A332361 Main diagonal is A332362. %K A332361 nonn,tabl %O A332361 1,1 %A A332361 _N. J. A. Sloane_, Feb 11 2020