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 A138036 #32 Jul 11 2019 02:57:11 %S A138036 1,0,2,0,2,1,3,0,3,1,3,2,4,0,4,1,4,2,4,3,5,0,5,1,5,2,5,3,5,4,6,0,6,1, %T A138036 6,2,6,3,6,4,6,5,7,0,7,1,7,2,7,3,7,4,7,5,7,6,8,0,8,1,8,2,8,3,8,4,8,5, %U A138036 8,6,8,7,9,0,9,1,9,2,9,3,9,4,9,5,9,6,9,7,9,8,10,0,10,1,10,2,10,3,10,4,10,5,10,6,10,7,10,8,10,9,11,0,11,1,11,2,11,3,11,4 %N A138036 Write n = C(i,2)+C(j,1) with i>j>=0; let L[n] = [i,j]; sequence gives list of pairs L[n], n >= 0. %C A138036 Each n >= 0 has a unique representation as n = C(i,2)+C(j,1) with i>j>=0. This is the combinatorial number system of degree t = 2. The i values are A002024, the j values A002262. %D A138036 D. E. Knuth, The Art of Computer Programming, vol. 4A, Combinatorial Algorithms, Section 7.2.1.3, Eq. (20), p. 360. %e A138036 The pairs L[0] through L[10] are %e A138036 [1, 0] %e A138036 [2, 0] %e A138036 [2, 1] %e A138036 [3, 0] %e A138036 [3, 1] %e A138036 [3, 2] %e A138036 [4, 0] %e A138036 [4, 1] %e A138036 [4, 2] %e A138036 [4, 3] %e A138036 [5, 0] %t A138036 A138036list[len_] := Module[{i = 0, j = 1, L = {1, 0}}, Do[i++; If[i == j, j++; i = 0]; AppendTo[L, j]; AppendTo[L, i], {len}]; L]; %t A138036 A138036list[60] (* _Jean-François Alcover_, Jul 11 2019, after _Peter Luschny_ *) %o A138036 (Sage) %o A138036 def A138036_list(len): %o A138036 i, j = 0, 1 %o A138036 L = [1, 0] %o A138036 for _ in range(len): %o A138036 i += 1 %o A138036 if i == j: %o A138036 j += 1 %o A138036 i = 0 %o A138036 L.append(j) %o A138036 L.append(i) %o A138036 return L %o A138036 A138036_list(47) # _Peter Luschny_, May 18 2015 %Y A138036 Cf. A002024, A002262. See A194847 for degree t=3. %K A138036 nonn,tabf %O A138036 0,3 %A A138036 _N. J. A. Sloane_, Sep 04 2011