

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.


16



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, 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, 18, 21, 18, 18, 14, 11, 1, 1, 12, 16, 20, 22, 23, 23, 22, 20, 16, 12, 1, 1, 13, 17, 22, 24
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,5


LINKS

Andrew Howroyd, Table of n, a(n) for n = 0..1274


FORMULA

From Andrew Howroyd, Sep 17 2017: (Start)
T(i, j) = 2 + Sum_{g=1..min(i,j)} floor(i/g) * floor(j/g) * mu(g) for i > 0, j > 0.
T(i, j) = signum(i) + signum(j) + A135646(i, j).
T(i, j) = {(x, y): gcd(x, y) = 1, 0<=x<=i, 0<=y<=j}.
(End)


EXAMPLE

The array begins:
0 1 1 1 1 ...
1 3 4 5 6 ...
1 4 5 7 8 ...
1 5 7 9 11 ...
1 6 8 11 13 ...
...


MATHEMATICA

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[ij, j], {i, 0, 12}, {j, 0, i}] // Flatten (* JeanFrançois Alcover, Apr 03 2017 *)


PROG

(PARI)
T(i, j) = (i>0) + (j>0) + sum(g=1, min(i, j), (i\g) * (j\g) * moebius(g));
for (i=0, 10, for(j=0, 10, print1(T(i, j), ", ")); print); \\ Andrew Howroyd, Sep 17 2017
(PARI)
T(i, j) = sum(h=0, i, sum(k=0, j, gcd(h, k) == 1)); \\ Andrew Howroyd, Sep 17 2017


CROSSREFS

Main diagonal is A049691.
Cf. A049639, A135646, A300778.
Sequence in context: A080575 A205117 A077228 * A132735 A028262 A173117
Adjacent sequences: A049684 A049685 A049686 * A049688 A049689 A049690


KEYWORD

nonn,tabl,nice


AUTHOR

Clark Kimberling


EXTENSIONS

More terms from Michael Somos


STATUS

approved



