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 A351522 #7 Feb 19 2022 13:46:07 %S A351522 0,1,1,1,2,1,1,3,3,1,1,3,3,3,1,1,3,4,4,3,1,1,3,4,3,4,3,1,1,3,5,5,5,5, %T A351522 3,1,1,3,4,5,4,5,4,3,1,1,3,5,5,6,6,5,5,3,1,1,3,4,5,6,5,6,5,4,3,1,1,3, %U A351522 5,6,6,7,7,6,6,5,3,1,1,3,4,5,6,7,6,7,6,5,4,3,1 %N A351522 Square array T(n, k) read by antidiagonals, n, k >= 0; T(n, k) is the number of distinct values in the set { T(i, j) with 0 <= i <= n and 0 <= j <= k and gcd(n-i, k-j) = 1 }. %C A351522 In other words, T(n, k) gives the number of distinct values in the rectangle with opposite corners (0, 0) and (n, k) visible from (n, k). %F A351522 T(n, k) = T(k, n). %F A351522 T(n, k) <= A049687(n, k). %e A351522 Array T(n, k) begins: %e A351522 n\k| 0 1 2 3 4 5 6 7 8 9 10 11 %e A351522 ---+---------------------------------------- %e A351522 0| 0 1 1 1 1 1 1 1 1 1 1 1 %e A351522 1| 1 2 3 3 3 3 3 3 3 3 3 3 %e A351522 2| 1 3 3 4 4 5 4 5 4 5 4 5 %e A351522 3| 1 3 4 3 5 5 5 5 6 5 6 6 %e A351522 4| 1 3 4 5 4 6 6 6 6 7 6 7 %e A351522 5| 1 3 5 5 6 5 7 7 8 8 8 8 %e A351522 6| 1 3 4 5 6 7 6 8 8 8 8 8 %e A351522 7| 1 3 5 5 6 7 8 7 9 9 9 9 %e A351522 8| 1 3 4 6 6 8 8 9 8 10 10 11 %e A351522 9| 1 3 5 5 7 8 8 9 10 9 11 11 %e A351522 10| 1 3 4 6 6 8 8 9 10 11 10 12 %e A351522 11| 1 3 5 6 7 8 8 9 11 11 12 11 %o A351522 (PARI) { T = matrix(M=13,M); for (d=1, #T, for (k=1, d, n=d+1-k; w=0; for (i=1, n, for (j=1, k, if (gcd(n-i, k-j)==1, w=bitor(w, 2^T[i,j])))); print1 (T[n,k] = hammingweight(w)", "))) } %o A351522 (Python) %o A351522 from math import gcd %o A351522 from functools import cache %o A351522 @cache %o A351522 def T(n, k): %o A351522 return len(set(T(i, j) for i in range(n+1) for j in range(k+1) if gcd(n-i, k-j) == 1)) %o A351522 def auptodiag(maxd): %o A351522 return [T(i, d-i) for d in range(maxd+1) for i in range(d+1)] %o A351522 print(auptodiag(12)) # _Michael S. Branicky_, Feb 13 2022 %Y A351522 Cf. A049687. %K A351522 nonn,tabl %O A351522 0,5 %A A351522 _Rémy Sigrist_, Feb 13 2022