cp's OEIS Frontend

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.

A332352 Triangle read by rows: T(m,n) = Sum_{-m m >= n >= 1.

This page as a plain text file.
%I A332352 #31 Oct 19 2023 12:50:16
%S A332352 0,0,0,2,4,16,4,8,28,48,6,12,44,76,120,8,16,60,104,164,224,10,20,80,
%T A332352 140,224,308,424,12,24,100,176,284,392,540,688,14,28,124,220,356,492,
%U A332352 680,868,1096,16,32,148,264,428,592,820,1048,1324,1600,18,36,176,316,516,716,996,1276,1616,1956,2392
%N A332352 Triangle read by rows: T(m,n) = Sum_{-m<i<m, -n<j<n, gcd{i,j}=2} (m-|i|)*(n-|j|), m >= n >= 1.
%H A332352 Paolo Xausa, <a href="/A332352/b332352.txt">Table of n, a(n) for n = 1..11325</a> (rows 1..150 of the triangle, flattened)
%H A332352 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_2(m,n).
%e A332352 Triangle begins:
%e A332352 0,
%e A332352 0, 0,
%e A332352 2, 4, 16,
%e A332352 4, 8, 28, 48,
%e A332352 6, 12, 44, 76, 120,
%e A332352 8, 16, 60, 104, 164, 224,
%e A332352 10, 20, 80, 140, 224, 308, 424,
%e A332352 12, 24, 100, 176, 284, 392, 540, 688,
%e A332352 14, 28, 124, 220, 356, 492, 680, 868, 1096,
%e A332352 16, 32, 148, 264, 428, 592, 820, 1048, 1324, 1600,
%e A332352 ...
%p A332352 VR := proc(m,n,q) local a,i,j; a:=0;
%p A332352 for i from -m+1 to m-1 do for j from -n+1 to n-1 do
%p A332352 if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
%p A332352 for m from 1 to 12 do lprint(seq(VR(m,n,2),n=1..m),); od:
%t A332352 A332352[m_,n_]:=Sum[If[GCD[i,j]==2,4(m-i)(n-j),0],{i,2,m-1,2},{j,2,n-1,2}]+If[n>2,2(m*n-2m),0]+If[m>2,2(m*n-2n),0];Table[A332352[m, n],{m,15},{n, m}] (* _Paolo Xausa_, Oct 18 2023 *)
%Y A332352 The main diagonal is A331772.
%Y A332352 Cf. A332350, A332351, A332353.
%K A332352 nonn,tabl
%O A332352 1,4
%A A332352 _N. J. A. Sloane_, Feb 10 2020