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.

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

This page as a plain text file.
%I A332353 #20 Oct 19 2023 11:28:24
%S A332353 0,0,0,1,2,8,2,4,14,24,3,6,22,38,60,4,8,30,52,82,112,5,10,40,70,112,
%T A332353 154,212,6,12,50,88,142,196,270,344,7,14,62,110,178,246,340,434,548,8,
%U A332353 16,74,132,214,296,410,524,662,800,9,18,88,158,258,358,498,638,808,978,1196
%N A332353 Triangle read by rows: T(m,n) = Sum_{-m<i<m, -n<j<n, gcd{i,j}=2} (m-|i|)*(n-|j|)/2, m >= n >= 1.
%C A332353 This is the triangle in A332352, halved.
%H A332353 Paolo Xausa, <a href="/A332353/b332353.txt">Table of n, a(n) for n = 1..11325</a> (rows 1..150 of the triangle, flattened)
%H A332353 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)/2.
%e A332353 Triangle begins:
%e A332353 0,
%e A332353 0, 0,
%e A332353 1, 2, 8,
%e A332353 2, 4, 14, 24,
%e A332353 3, 6, 22, 38, 60,
%e A332353 4, 8, 30, 52, 82, 112,
%e A332353 5, 10, 40, 70, 112, 154, 212,
%e A332353 6, 12, 50, 88, 142, 196, 270, 344,
%e A332353 7, 14, 62, 110, 178, 246, 340, 434, 548,
%e A332353 8, 16, 74, 132, 214, 296, 410, 524, 662, 800,
%e A332353 ...
%p A332353 VR := proc(m,n,q) local a,i,j; a:=0;
%p A332353 for i from -m+1 to m-1 do for j from -n+1 to n-1 do
%p A332353 if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;
%p A332353 for m from 1 to 12 do lprint(seq(VR(m,n,2)/2,n=1..m),); od:
%t A332353 A332353[m_,n_]:=Sum[If[GCD[i,j]==2,2(m-i)(n-j),0],{i,2,m-1,2},{j,2,n-1,2}]+If[n>2,m*n-2m,0]+If[m>2,m*n-2n,0];Table[A332353[m, n],{m,15},{n, m}] (* _Paolo Xausa_, Oct 18 2023 *)
%Y A332353 The main diagonal is A177719.
%Y A332353 Cf. A332350, A332352.
%K A332353 nonn,tabl
%O A332353 1,5
%A A332353 _N. J. A. Sloane_, Feb 10 2020