OFFSET
1,2
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..32768
MATHEMATICA
f[n_] := Which[n == 1, 0, OddQ@ #, 0, EvenQ@ #, 1 + f[#/2]] &@ Fold[BitXor, n, Quotient[n, 2^Range[BitLength@ n - 1]]];
Array[f, {240}] /. 0 -> Nothing (* Michael De Vlieger, Feb 12 2016, after Jan Mangaldan at A006068 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Feb 10 2016
STATUS
approved