I found this excellent article while searching for the details of Ada Lovelace's original program. Amazing how legible the thought process is as a modern day programmer!<p>Also see this other writeup which goes into much finer detail about the algorithm: <a href="https://enigmaticcode.wordpress.com/2015/09/24/running-the-first-program/" rel="nofollow noreferrer">https://enigmaticcode.wordpress.com/2015/09/24/running-the-f...</a>