2

Rational numbers are countable as shown by the usual table here: https://aminsaied.wordpress.com/2012/05/21/diagonal-arguments/

So, counting in the zig-zag manner as shown in the table, $1/1$ is the first rational, $3/2$ is the eighth, $1/4$ is the tenth etc. I don't know what the technical name is for “first”, “eighth” and “tenth” - maybe “position” or "rank". My question is, given the integers $a$ and $b$ how can I calculate the position or rank of the rational $\frac{a}{b}$ (without physically counting the numbers)?

Peter4075
  • 849

1 Answers1

2

This is from G. H. Hardy, A Course of Pure Mathematics, page 1 of Chapter 1. http://www.gutenberg.org/files/38769/38769-pdf.pdf?session_id=4495e3437d1f87369cf842af766691752f0981be

enter image description here

You are probably looking for the more complicated formula ...

Ethan Bolker
  • 95,224
  • 7
  • 108
  • 199
  • I was just looking for a way to rank the rational numbers, so I don't mind including repeated rationals. Pedantically, the sequence you quote only follows a northeast direction, not zig-zagging northeast, southwest, northeast as it does in the table. – Peter4075 Mar 28 '16 at 17:55
  • I'm pretty interested in "the more complicated formula" mentioned in the last paragraph. Do you know of any reference? – YuiTo Cheng Jul 07 '19 at 10:14
  • @YuiToCheng I doubt that Hardy and Wright had any particular formula in mind, and I don't know of one. You might be interested in the Calcin-Wilf tree: https://en.wikipedia.org/wiki/Calkin%E2%80%93Wilf_tree – Ethan Bolker Jul 07 '19 at 10:31