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 A194195 #25 Jun 02 2025 04:15:06 %S A194195 1,2,2,1,3,3,3,2,1,4,4,4,4,3,2,1,5,5,5,5,5,4,3,2,1,6,6,6,6,6,6,5,4,3, %T A194195 2,1,7,7,7,7,7,7,7,6,5,4,3,2,1,8,8,8,8,8,8,8,8,7,6,5,4,3,2,1,9,9,9,9, %U A194195 9,9,9,9,9 %N A194195 First inverse function (numbers of rows) for pairing function A060734. %C A194195 The sequence is the second inverse function (numbers of columns) for pairing function A060736. %H A194195 Boris Putievskiy, <a href="/A194195/b194195.txt">Rows n = 1..140 of triangle, flattened</a> %H A194195 Boris Putievskiy, <a href="http://arxiv.org/abs/1212.2732">Transformations Integer Sequences And Pairing Functions</a> arXiv:1212.2732 [math.CO], 2012. %F A194195 a(n) = min{t; t^2 - n + 1}, where t=floor(sqrt(n-1))+1. %e A194195 The start of the sequence as triangle array read by rows: %e A194195 1; %e A194195 2,2,1; %e A194195 3,3,3,2,1; %e A194195 4,4,4,4,3,2,1; %e A194195 . . . %e A194195 Row number k contains 2k-1 numbers k,k,...k,k-1,k-2,...1 (k times repetition "k"). %t A194195 f[n_]:=Module[{t=Floor[Sqrt[n-1]]+1},Min[t,t^2-n+1]]; Array[f,80] (* _Harvey P. Dale_, Dec 31 2012 *) %o A194195 (Python) %o A194195 t=int(math.sqrt(n-1)) +1 %o A194195 i=min(t,t**2-n+1) %Y A194195 Cf. A060734, A060736, A220603, A220604 %K A194195 nonn,tabf %O A194195 1,2 %A A194195 _Boris Putievskiy_, Dec 21 2012