OFFSET
1,4
COMMENTS
First column is A051162. Right diagonal is all zeros.
EXAMPLE
Triangle where distances are measured begins:
1
2 3
4 5 6
7 8 9 10
Distance between 1 and 1 is 0, hence T(1, 1) = 0.
Distance between 2 and 1 is 1, and between 2 and 2 is 0. Hence second row of this triangle is 1, 0.
Triangle starts:
0;
1, 0;
2, 1, 0;
2, 1, 2, 0;
3, 2, 1, 1, 0;
PROG
(PARI) getxy(n) = {y = sqrtint(2*n); if (n<=y*(y+1)/2, y--); x = n - y*(y+1)/2; [x, y]; }
trg(nn) = {i= 1; for (n = 1, nn, v = getxy(n); for (k = 1, n, nv = getxy(k); print1(abs(nv[1]-v[1])+abs(nv[2]-v[2]), ", "); ); print(); ); }
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Michel Marcus, Jan 26 2014
STATUS
approved