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 $\frac{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\cdots$.
The first part of the picture is drawn below.
In the sequence we sometimes see B followed by B, sometimes see B followed by R, and sometimes see R followed by B, but we never see R followed by R. We say there are 'three patterns of length 2' in the sequence (the three patterns being BB, BR, RB). How many patterns of length 1000 do we see?