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 A210535 #23 Feb 16 2025 08:33:17 %S A210535 1,2,1,2,3,1,2,4,3,1,2,4,5,3,1,2,4,6,5,3,1,2,4,6,7,5,3,1,2,4,6,8,7,5, %T A210535 3,1,2,4,6,8,9,7,5,3,1,2,4,6,8,10,9,7,5,3,1,2,4,6,8,10,11,9,7,5,3,1,2, %U A210535 4,6,8,10,12,11,9,7,5,3,1,2,4,6,8,10,12 %N A210535 Second inverse function (numbers of columns) for pairing function A209293. %H A210535 Boris Putievskiy, <a href="/A210535/b210535.txt">Rows n = 1..140 of triangle, flattened</a> %H A210535 Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations [of] Integer Sequences And Pairing Functions</a> arXiv:1212.2732 [math.CO], 2012. %H A210535 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PairingFunction.html">Pairing functions</a> %F A210535 a(n) = 2*A200260(n)-A101688(n)*(4*A002260(n)-2*A003056(n)-3). %F A210535 a(n) = 2*i-v*(4*i-2*t-3), where t = floor((-1+sqrt(8*n-7))/2), i = n-t*(t+1)/2, v = floor((2*n+1-t*(t+1))/(t+3)). %e A210535 The start of the sequence as triangle array read by rows: %e A210535 1; %e A210535 2,1; %e A210535 2,3,1; %e A210535 2,4,3,1; %e A210535 2,4,5,3,1; %e A210535 2,4,6,5,3,1; %e A210535 2,4,6,7,5,3,1; %e A210535 2,4,6,8,7,5,3,1; %e A210535 . . . %e A210535 Row number r contains permutation numbers from 1 to r: 2,4,6,...2*floor(r/2),2*floor(r/2)-1,2*floor(r/2)-3,...3,1. %o A210535 (Python) %o A210535 t=int((math.sqrt(8*n-7)-1)/2) %o A210535 i=n-t*(t+1)/2 %o A210535 v=int((2*n+1-t*(t+1))/(t+3)) %o A210535 result=2*i-v*(4*i-2*t-3) %Y A210535 Cf. A209293, A200260, A101688, A003056, A220073. %K A210535 nonn %O A210535 1,2 %A A210535 _Boris Putievskiy_, Jan 28 2013