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 A236459 #11 Dec 09 2014 03:32:59 %S A236459 0,1,0,2,1,0,2,1,2,0,3,2,1,1,0,4,3,2,2,1,0,3,2,3,1,2,3,0,4,3,2,2,1,2, %T A236459 1,0,5,4,3,3,2,1,2,1,0,6,5,4,4,3,2,3,2,1,0,4,3,4,2,3,4,1,2,3,4,0,5,4, %U A236459 3,3,2,3,2,1,2,3,1,0,6,5,4,4,3,2,3,2,1,2,2,1,0,7,6,5,5,4,3,4,3,2,1,3,2,1,0 %N A236459 Regular triangle: T(n, k) Manhattan distance between n and k in a left-aligned triangle with next M natural numbers in row M. %C A236459 First column is A051162. Right diagonal is all zeros. %e A236459 Triangle where distances are measured begins: %e A236459 1 %e A236459 2 3 %e A236459 4 5 6 %e A236459 7 8 9 10 %e A236459 Distance between 1 and 1 is 0, hence T(1, 1) = 0. %e A236459 Distance between 2 and 1 is 1, and between 2 and 2 is 0. Hence second row of this triangle is 1, 0. %e A236459 Triangle starts: %e A236459 0; %e A236459 1, 0; %e A236459 2, 1, 0; %e A236459 2, 1, 2, 0; %e A236459 3, 2, 1, 1, 0; %o A236459 (PARI) getxy(n) = {y = sqrtint(2*n); if (n<=y*(y+1)/2, y--); x = n - y*(y+1)/2; [x, y];} %o A236459 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(););} %Y A236459 Cf. A236345. %K A236459 nonn,tabl %O A236459 1,4 %A A236459 _Michel Marcus_, Jan 26 2014