OFFSET
0,4
LINKS
Jianrui Xie, On Symmetric Invertible Binary Pairing Functions, arXiv:2105.10752 [math.CO], 2021.
EXAMPLE
Array begins:
0 1 2 4 6 ...
1 3 5 7 10 ...
2 5 8 11 14 ...
4 7 11 15 19 ...
6 10 14 19 24 ...
...
MATHEMATICA
T[n_, k_] := ((n + k + 1)^2 - Mod[n + k + 1, 2])/4 + Min[n, k]; Table[T[k, n - k], {n, 0, 11}, {k, 0, n}] // Flatten (* Amiram Eldar, May 25 2021 *)
PROG
(PARI) T(n, k) = ((n+k+1)^2 - (n+k+1)%2)/4 + min(n, k);
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Michel Marcus, May 25 2021
STATUS
approved