login
A344646
Array read by antidiagonals T(n,k) = ((n+k+1)^2 - (n+k+1) mod 2)/4 + min(n,k) for n and k >= 0.
0
0, 1, 1, 2, 3, 2, 4, 5, 5, 4, 6, 7, 8, 7, 6, 9, 10, 11, 11, 10, 9, 12, 13, 14, 15, 14, 13, 12, 16, 17, 18, 19, 19, 18, 17, 16, 20, 21, 22, 23, 24, 23, 22, 21, 20, 25, 26, 27, 28, 29, 29, 28, 27, 26, 25, 30, 31, 32, 33, 34, 35, 34, 33, 32, 31, 30, 36, 37, 38, 39, 40, 41, 41, 40, 39, 38, 37, 36
OFFSET
0,4
LINKS
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
Cf. A128282 (another pairing function).
Sequence in context: A241255 A174625 A178853 * A120641 A008666 A240854
KEYWORD
nonn,tabl
AUTHOR
Michel Marcus, May 25 2021
STATUS
approved