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 A037162 #11 Mar 06 2015 22:49:39 %S A037162 1,1,1,1,2,2,1,1,3,3,1,1,2,3,4,4,3,2,1,1,5,5,1,1,2,3,4,5,6,6,5,4,3,2, %T A037162 1,1,3,5,7,7,5,3,1,1,2,4,5,7,8,8,7,5,4,2,1,1,3,7,9,9,7,3,1,1,2,3,4,5, %U A037162 6,7,8,9,10,10,9,8,7,6,5,4,3,2,1 %N A037162 Well-order the rational numbers; take denominators. %D A037162 Sierpiński, Cardinal and Ordinal Numbers, Warsaw 1965, 2nd ed., p. 40. %H A037162 Reinhard Zumkeller, <a href="/A037162/b037162.txt">Table of n, a(n) for n = 0..10000</a> %t A037162 order[n_] := Join[-Reverse[ pos = Select[(r = Range[n])/Reverse[r], Numerator[#] + Denominator[#] == n + 1 & ] ], pos]; order[0] = 0; Denominator[ Flatten[ Table[ order[n], {n, 0, 10}]]] (* _Jean-François Alcover_, Jun 27 2012 *) %o A037162 (Haskell) %o A037162 import Data.List (transpose) %o A037162 import Data.Ratio ((%), denominator) %o A037162 a037162 n = a037162_list !! n %o A037162 a037162_list = 1 : map denominator %o A037162 (concat $ concat $ transpose [map (map negate) qss, map reverse qss]) %o A037162 where qss = map q [1..] %o A037162 q x = map (uncurry (%)) $ filter ((== 1) . uncurry gcd) $ %o A037162 zip (reverse zs) zs where zs = [1..x] %o A037162 -- _Reinhard Zumkeller_, Mar 08 2013 %Y A037162 Cf. A037161. %Y A037162 Cf. A038567. %K A037162 nonn,easy,nice,frac %O A037162 0,5 %A A037162 _N. J. A. Sloane_