even/odd definitions

Added test to see if cycle, sequence and nodeid is odd or even, and integrated that into program 2.