OFFSET
0,7
COMMENTS
From Robert Israel, Jun 25 2015: (Start)
T(i,j) = number of (x,y) with 1 <= x <= i, 1 <= y <= j and gcd(x,y) > 1.
T(n,n) - T(n-1,n) = A062830(n) for x >= 2.
T(m+1,n+1) - T(m+1,n) - T(m,n+1) + T(m,n) = 1 if gcd(m+1,n+1) > 1, 0 otherwise. (End)
LINKS
Ivan Neretin, Table of n, a(n) for n = 0..5049
EXAMPLE
Antidiagonals (each starting on row 0):
{0};
{0,0};
{1,0,1};
...
Array begins:
0 0 1 2 3 4 5
0 0 1 2 3 4 5
1 1 3 4 6 7 9
2 2 4 6 8 9 12
3 3 6 8 11 12 16
4 4 7 9 12 14 18
5 5 9 12 16 18 23
...
MAPLE
N := 20: # to get the first N*(N+1)/2 terms
T:= Array(1..N+1, 1..N+1):
B:= Array(1..N+1, 1..N+1, (i, j) -> `if`(igcd(i-1, j-1)>1, 1, 0)):
T[1, 1..N+1]:= Statistics:-CumulativeSum(B[1, 1..N+1]):
for i from 2 to N+1 do
T[i, 1..N+1]:= T[i-1, 1..N+1] + Statistics:-CumulativeSum(B[i, 1..N+1])
od:
seq(seq(round(T[i+1, t-i+1]), i=0..t), t=0..N); # Robert Israel, Jun 25 2015
# alternative program R. J. Mathar, Oct 26 2015
A049615 := proc(n, k)
local a, x, y;
a := 0 ;
for x from 0 to n do
for y from 0 to k do
if igcd(x, y) > 1 then
a := a+1 ;
end if;
end do:
end do:
a;
end proc:
seq(seq(A049615(d-k, k), k=0..d), d=0..10) ;
MATHEMATICA
Table[Length[Select[Flatten[Table[{x, y}, {x, 0, n - k}, {y, 0, k}], 1], GCD @@ # > 1 &]], {n, 0, 11}, {k, 0, n}] // Flatten (* Ivan Neretin, Jun 25 2015 *)
PROG
(PARI) T(n, k) = sum(i=0, n, sum(j=0, k, gcd(i, j)>1));
tabl(7, 7, n, k, T(n-1, k-1)) \\ Michel Marcus, Aug 06 2021
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
STATUS
approved