Here’s a fun observation.
How quickly can you find a number between
Without using a calculator?
For any two rational numbers1 you can always find another rational number that lies between them by dividing the sum of their numerators by the sum of their denominators.
Huh? For numbers
In our case:
(format nil "27 / 97 = ~a~&54 / 195 = ~a <--~&27 / 98 = ~a~&"
(/ 27.0 97)
(/ 54.0 195)
(/ 27.0 98))
Why do I care?
I was talking to my team at one point and we were making a list of priorities.
We came up with the first couple: 1, 2, 3, … Then came the questions.
What about X? Well, that sits between 1 and 2. Let’s call it 1.5.
What about Y? That sits between 1 and 1.5, so let’s call it 4/3 (1/1 + 3/2 = 4/3) 🤨
What about Z? That sits between 4/3 and 1.5 so let’s call it 7/5 (4/3 + 3/2 = 7/5) 🤨🤨
It then became a bit of a game, testing out my mental arithmetic. They won, I made a mistake, but the underlying algorithm kept working.
Proof(-ish)
Define
(I’ll leave it to you to verify the following still holds when
If we add
Equivalently, if we add
Using Eqs.
A rational number is a real number that can be expressed as the ratio of two integers. Some examples:
, , , but something like is irrational and can’t be expressed as a fraction. ↩︎