The following question is modified from the the 2021 Mathsbombe competition (now closed):
Beatrice lines up an infinitely large piece of squared graph paper with red lines going horizontally at 1cm intervals and blue lines going vertically at 1cm intervals. Beatrice then draws an infinitely long straight line, with gradient $21/31$ to the horizontal starting from the point with coordinates $(0.5,0.5)$. Every time Beatrice's line crosses a red (horizontal) line she writes down R. Every time her line crosses a blue (vertical) line she writes down B. This way she makes an infinite sequence starting BRBRBBRBR..
The first part of the picture is drawn below.
It turns out that the binary expansion of the gradient of the line, $21/31$,is $0..101011010...$ Which is the same as the sequence of letters BRBRBBRBR...
Is the a way to understand this connection?
