* (()())
* ((()())())
* (((()())())())
(((()())())(()()))
* ((((()())())())())
((((()())())())(()()))
* ((((()())())(()()))())
((((()())())(()()))(()()))
((((()())())(()()))((()())()))
((((()())())(()()))(((()())())()))
* (((((()())())())())())
(((((()())())())())(()()))
* (((((()())())())(()()))())
(((((()())())())(()()))(()()))
(((((()())())())(()()))((()())()))
(((((()())())())(()()))(((()())())()))
I added asterisks in front of the primes. Here's the set of 16-bit ints:https://gist.github.com/cieplak/213fb4c88581d8971b274b7ec647...
The regex just checks if the string ends with '())':
cat integers.txt | grep '())$' | nl | tail -1