Code to find words composed of elements in the periodic table which are strictly increasing. That is, the periodic number of each element in the word is larger than all preceding elements.
The internet has plenty of lists of words composed of periodic element abbreviations. For a project I needed a subset of these words that were just composed of strictly increasing perodic elements, so I wrote this little bit of code.
I used Jeff Thompson's list of words in the periodic table, but you can use any list that capitalizes words appropriately. (Helium/Nitrogen would be "HeN", not "HEN" or "Hen".) This file must have one word per line, and must be saved as WordFile.txt.
See my gist for the output of this code.