login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Triangle read by rows: T(m,n) = number of different lines in a rectangular m X n array of points with integer coordinates (x,y): 0 <= x <= m, 0 <= y <= n.
5

%I #25 Jun 04 2023 18:56:35

%S 0,1,6,1,11,20,1,18,35,62,1,27,52,93,140,1,38,75,136,207,306,1,51,100,

%T 181,274,405,536,1,66,131,238,361,534,709,938,1,83,164,299,454,673,

%U 894,1183,1492,1,102,203,370,563,836,1111,1470,1855,2306

%N Triangle read by rows: T(m,n) = number of different lines in a rectangular m X n array of points with integer coordinates (x,y): 0 <= x <= m, 0 <= y <= n.

%C We may assume n <= m since T(m,n)=T(n,m).

%H M. A. Alekseyev, M. Basova, and N. Yu. Zolotykh, <a href="http://dx.doi.org/10.1137/140978090">On the minimal teaching sets of two-dimensional threshold functions</a>, SIAM J. Disc. Math. 29(1), 2015, pp. 157-165.

%H Les Reid, <a href="http://faculty.missouristate.edu/l/lesreid/POW07_04.html">Problem #7: How Many Lines Does the Lattice of Points Generate?</a>, Problems from the 04-05 academic year, Challenge Archive, Missouri State University's Problem Corner.

%F T(0, 0) = 0; T(m, 0) = 1, m >= 1.

%F When both m,n -> +oo, T(m,n) / 2Cmn -> 9/(2*pi^2). - _Dan Dima_, Mar 18 2006

%F T(n,m) = A295707(n,m). - _R. J. Mathar_, Dec 17 2017

%e Triangle begins

%e 0,

%e 1, 6,

%e 1, 11, 20,

%e 1, 18, 35, 62,

%e 1, 27, 52, 93, 140,

%e 1, 38, 75, 136, 207, 306,

%e 1, 51, 100, 181, 274, 405, 536,

%e 1, 66, 131, 238, 361, 534, 709, 938,

%e 1, 83, 164, 299, 454, 673, 894, 1183, 1492,

%e 1, 102, 203, 370, 563, 836, 1111, 1470, 1855, 2306,

%e ...

%p VR := proc(m,n,q) local a,i,j; a:=0;

%p for i from -m+1 to m-1 do for j from -n+1 to n-1 do

%p if gcd(i,j)=q then a:=a+(m-abs(i))*(n-abs(j)); fi; od: od: a; end;

%p LL:=(m,n)->(VR(m,n,1)-VR(m,n,2))/2;

%p for m from 1 to 12 do lprint([seq(LL(m,n),n=1..m)]); od: # _N. J. A. Sloane_, Feb 10 2020

%t VR[m_, n_, q_] := Sum[If[GCD[i, j] == q, (m - Abs[i])(n - Abs[j]), 0], {i, -m + 1, m - 1}, {j, -n + 1, n - 1}];

%t LL[m_, n_] := (1/2)(VR[m, n, 1] - VR[m, n, 2]);

%t Table[LL[m, n], {m, 1, 10}, {n, 1, m}] // Flatten (* _Jean-François Alcover_, Jun 04 2023, after _N. J. A. Sloane_ *)

%Y Cf. A295707 (symmetric array), A018808 (diagonal). A160842 - A160850 (columns).

%K nonn,tabl

%O 0,3

%A _Dan Dima_, May 23 2005

%E T(3,3) corrected and sequence extended by _R. J. Mathar_, Dec 17 2017