Arithmetic Sequence XOR - Coding problem | OneNoughtOne