Annual appeal: Please make a donation to keep the OEIS running!
Over 6000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".

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)).