The answer is 8. I'll explain why. 4, 12, 13, 15, 14, 10, 11, 9 ... This is a subsequence of the sequence of binary gray codes converted to base ten. The sequence of gray codes beginning with 0 converted to base 10 is: 0,1,3,2,6,7,5,4,12,13,15,14,10,11,9,8,24,25,27,26,30,31,29,... The binary gray codes are below. Each is considered as having an arbitrary number of 0's in front: 0...00000 which converted to base 10 is 0 0...00001 which converted to base 10 is 1 0...00011 which converted to base 10 is 3 0...00010 which converted to base 10 is 2 0...00110 which converted to base 10 is 6 0...00111 which converted to base 10 is 7 0...00101 which converted to base 10 is 5 0...00100 which converted to base 10 is 4 <-- your sequence starts here. 0...01100 which converted to base 10 is 12 0...01101 which converted to base 10 is 13 0...01111 which converted to base 10 is 15 0...01110 which converted to base 10 is 14 0...01010 which converted to base 10 is 10 0...01011 which converted to base 10 is 11 0...01001 which converted to base 10 is 9 0...01000 which converted to base 10 is 8 <-- the next one after the 9. 0...11000 which converted to base 10 is 24 0...11001 which converted to base 10 is 25 0...11010 which converted to base 10 is 27 ..., Rule for obtaining any gray code from the preceding gray code: Change the digit which is farthest to the right WHICH DOES NOT GIVE A PREVIOUS GRAY CODE, from a 0 to a 1, or from a 1 to a 0. Edwin