Over at Reddit, http://i.imgur.com/tDSX24E.jpg is getting a lot of attention. https://www.reddit.com/r/math/comments/3k1qe6/this_is_in_a_high_school_math_... In short, the textbook Glencoe Algebra II claims that there is no relation between the integers and the rationals. Georg Cantor showed it in the 1870's. There is also Calkin-Wilf and Stern-Brocat CalkinWilfPosition[r_] := With[{cf = ContinuedFraction[r]}, First@FromDigits[ Flatten@MapIndexed[Table[Mod[#2[[1]], 2], {#1}] &, Reverse@#], {2}] &@ If[EvenQ[Length[cf]], MapAt[Sequence @@ {# - 1, 1} &, cf, -1], cf]]; CalkinWilfRational[n_Integer] := Module[{s0, s1}, s0 = IntegerDigits[n, 2]; s1 = If[EvenQ[Length[#]], MapAt[(Sequence @@ {#, {}}) &, #, -1], #] &@Split[s0]; FromContinuedFraction[Reverse[Length /@ s1]]]; AlmostBitReverse[n_] := FromDigits[ Prepend[Reverse[Drop[IntegerDigits[n, 2], 1]], 1], 2]; SternBrocatPosition[fraction_] := AlmostBitReverse[CalkinWilfPosition[fraction]]; SternBrocatRational[n_Integer] := CalkinWilfRational[AlmostBitReverse[n]]; I figured that the relationship between these would be in OEIS -- and they are. https://oeis.org/A059893 -- but this doesn't mention the relation. But it's how I came up with the Stern-Brocat code. If you order either set of fractions, the position in the other set is given by A059893 --Ed Pegg Jr.