The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

A116626

a(1)=1; a(odd n) = a(n-1) XOR a(n-2), for a(even n) we find the first i > 1 such that neither i nor (i XOR A116626(n-1)) is present in A116626(1..n-1), in which case a(n) = (i XOR A116626(n-1)).