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 A236346 #21 Aug 07 2025 03:09:34 %S A236346 2,3,4,4,5,6,6,8,7,10,8,9,12,10,14,11,12,16,13,18,14,20,15,16,22,17, %T A236346 24,18,19,26,20,28,21,22,30,23,32,24,34,25,26,36,27,38,28,29,40,30,42, %U A236346 31,44,32,33,46,34,48,35,36,50,37,52,38,54,39,40,56,41,58 %N A236346 Manhattan distances between n^2 and (n+1)^2 in a left-aligned triangle with next M natural numbers in row M: 1, 2 3, 4 5 6, 7 8 9 10, etc. %C A236346 Triangle in which we find distances begins: %C A236346 1 %C A236346 2 3 %C A236346 4 5 6 %C A236346 7 8 9 10 %C A236346 11 12 13 14 15 %C A236346 16 17 18 19 20 21 %C A236346 22 23 24 25 26 27 28 %C A236346 29 30 31 32 33 34 35 36 %C A236346 37 38 39 40 41 42 43 44 45 %C A236346 Subsequence of terms such that a(m)>=a(m-1) and a(m)>=a(m+1) seems to be A005843 (even numbers) except first two terms, and if such a(m) are removed, the remainder seems to be A000027 (natural numbers) except 1: %C A236346 2, 3, *4*, 4, 5, *6*, 6, *8*, 7, *10*, 8, 9, *12*, 10, *14*, 11, 12, *16*, 13, *18*, 14, *20*, 15, ... %H A236346 David Radcliffe, <a href="/A236346/b236346.txt">Table of n, a(n) for n = 1..10000</a> %F A236346 a(n) = A214848(n) + |A057049(n+1) - A057049(n)|. - _David Radcliffe_, Aug 06 2025 %o A236346 (Python) %o A236346 import math %o A236346 def getXY(n): %o A236346 y = int(math.sqrt(n*2)) %o A236346 if n<=y*(y+1)//2: y-=1 %o A236346 x = n - y*(y+1)//2 %o A236346 return x, y %o A236346 for n in range(1, 77): %o A236346 ox, oy = getXY(n*n) %o A236346 nx, ny = getXY((n+1)**2) %o A236346 print(abs(nx-ox)+abs(ny-oy), end=', ') %Y A236346 Cf. A236345, A005843, A000027. %K A236346 nonn,easy %O A236346 1,1 %A A236346 _Alex Ratushnyak_, Jan 23 2014