Comment
Comment by matthewmcg
This anecdote is memorably presented as an application of modular arithmetic (along with the behavior of Enigma machine rotors) in Neal Stephenson’s Cryptonomicon. See the discussion in this review of the book: https://www.ams.org/notices/199911/rev-kasman.pdf