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 A220604 #26 Feb 15 2022 12:56:04 %S A220604 1,1,2,2,3,3,3,2,1,1,2,3,4,4,4,4,5,5,5,5,5,4,3,2,1,1,2,3,4,5,6,6,6,6, %T A220604 6,6,7,7,7,7,7,7,7,6,5,4,3,2,1,1,2,3,4,5,6,7,8,8,8,8,8,8,8,8,9,9,9,9, %U A220604 9,9,9,9,9,8,7,6,5,4,3,2,1,1,2,3,4,5,6,7,8,9,10,10,10,10,10,10,10,10,10,10 %N A220604 Second inverse function (numbers of columns) for pairing function A081344. %H A220604 Boris Putievskiy, <a href="/A220604/b220604.txt">Rows n = 1..140 of triangle, flattened</a> %H A220604 Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations Integer Sequences And Pairing Functions</a>, arXiv:1212.2732 [math.CO], 2012. %F A220604 As a linear array, the sequence is a(n) = mod(t;2)*min{t; t^2 - n + 1} + mod(t + 1; 2)*min{t; n - (t - 1)^2}, where t=floor[sqrt(n-1)]+1. %e A220604 The start of the sequence as triangle array T(n,k) read by rows, row number k contains 2k-1 numbers: %e A220604 1; %e A220604 1,2,2; %e A220604 3,3,3,2,1; %e A220604 1,2,3,4,4,4,4; %e A220604 ... %e A220604 If k is even the row is 1,2,...,k,k...k (k times repetition "k" at the end of row). %e A220604 If k is odd the row is k,k,...k,k-1,k-2,...1 (k times repetition "k" at the start of row). %o A220604 (Python) %o A220604 t=int(math.sqrt(n-1))+1 %o A220604 j=(t % 2)*min(t,t**2-n+1) + ((t+1) % 2)*min(t,n-(t-1)**2) %Y A220604 Cf. A081344. %K A220604 nonn,tabf %O A220604 1,3 %A A220604 _Boris Putievskiy_, Dec 17 2012