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