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 A208234 #21 Feb 16 2022 11:59:10 %S A208234 1,2,1,1,2,3,4,2,3,1,1,4,3,2,5,6,2,4,3,5,1,1,6,3,4,5,2,7,8,2,6,4,5,3, %T A208234 7,1,1,8,3,6,5,4,7,2,9,10,2,8,4,6,5,7,3,9,1,1,10,3,8,5,6,7,4,9,2,11 %N A208234 Second inverse function (numbers of columns) for pairing function A188568. %H A208234 Boris Putievskiy, <a href="/A208234/b208234.txt">Rows n = 1..140 of triangle, flattened</a> %H A208234 Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations Integer Sequences And Pairing Functions</a>, arXiv:1212.2732 [math.CO], 2012. %F A208234 a(n) = -max(i,j)*((-1)^i-1)/2+min(i,j)*((-1)^i+1)/2, if i>=j %F A208234 a(n) = max(i,j)*((-1)^j+1)/2-min(i,j)*((-1)^j-1)/2, if i<j, %F A208234 where t = floor((-1+sqrt(8*n-7))/2), i = n-t*(t+1)/2, j = (t*t+3*t+4)/2-n. %e A208234 The start of the sequence as triangle array read by rows: %e A208234 1; %e A208234 2,1; %e A208234 1,2,3; %e A208234 4,2,3,1; %e A208234 1,4,3,2,5; %e A208234 6,2,4,3,5,1; %e A208234 1,6,3,4,5,2,7; %e A208234 ... %e A208234 Row number k contains permutation numbers form 1 to k. %o A208234 (Python) %o A208234 t=int((math.sqrt(8*n-7) - 1)/ 2) %o A208234 i=n-t*(t+1)//2 %o A208234 j=(t*t+3*t+4)//2-n %o A208234 if i>=j: %o A208234 result=-max(i,j)*((-1)**i-1)/2+min(i,j)*((-1)**i+1)/2 %o A208234 else: %o A208234 result= max(i,j)*((-1)**j+1)/2-min(i,j)*((-1)**j-1)/2 %Y A208234 Cf. A188568. %K A208234 nonn %O A208234 1,2 %A A208234 _Boris Putievskiy_, Jan 10 2013