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 A049687 #23 May 22 2018 05:42:37 %S A049687 0,1,1,1,3,1,1,4,4,1,1,5,5,5,1,1,6,7,7,6,1,1,7,8,9,8,7,1,1,8,10,11,11, %T A049687 10,8,1,1,9,11,14,13,14,11,9,1,1,10,13,15,17,17,15,13,10,1,1,11,14,18, %U A049687 18,21,18,18,14,11,1,1,12,16,20,22,23,23,22,20,16,12,1,1,13,17,22,24 %N A049687 Array T read by diagonals: T(i,j)=number of lines passing through (0,0) and at least one other lattice point (h,k) satisfying 0<=h<=i, 0<=k<=j. %H A049687 Andrew Howroyd, <a href="/A049687/b049687.txt">Table of n, a(n) for n = 0..1274</a> %F A049687 From _Andrew Howroyd_, Sep 17 2017: (Start) %F A049687 T(i, j) = 2 + Sum_{g=1..min(i,j)} floor(i/g) * floor(j/g) * mu(g) for i > 0, j > 0. %F A049687 T(i, j) = signum(i) + signum(j) + A135646(i, j). %F A049687 T(i, j) = |{(x, y): gcd(x, y) = 1, 0<=x<=i, 0<=y<=j}|. %F A049687 (End) %e A049687 The array begins: %e A049687 0 1 1 1 1 ... %e A049687 1 3 4 5 6 ... %e A049687 1 4 5 7 8 ... %e A049687 1 5 7 9 11 ... %e A049687 1 6 8 11 13 ... %e A049687 ... %t A049687 a[0, 0] = 0; a[0, _] = a[_, 0] = 1; a[i_, j_] := Module[{slopes, cnt}, slopes = Union @ Flatten @ Table[k/h, {h, 1, i }, {k, 1, j }]; cnt[ slope_] := Count[Flatten[Table[{h, k}, {h, 1, i }, {k, 1, j }], 1], {h_, k_} /; k/h == slope]; Count[cnt /@ slopes, c_ /; c >= 1] + 2]; Table[a[i-j, j], {i, 0, 12}, {j, 0, i}] // Flatten (* _Jean-François Alcover_, Apr 03 2017 *) %o A049687 (PARI) %o A049687 T(i,j) = (i>0) + (j>0) + sum(g=1, min(i,j), (i\g) * (j\g) * moebius(g)); %o A049687 for (i=0, 10, for(j=0, 10, print1(T(i,j), ", ")); print); \\ _Andrew Howroyd_, Sep 17 2017 %o A049687 (PARI) %o A049687 T(i,j) = sum(h=0, i, sum(k=0, j, gcd(h,k) == 1)); \\ _Andrew Howroyd_, Sep 17 2017 %Y A049687 Main diagonal is A049691. %Y A049687 Cf. A049639, A135646, A300778. %K A049687 nonn,tabl,nice %O A049687 0,5 %A A049687 _Clark Kimberling_ %E A049687 More terms from _Michael Somos_