A340400(n) = my (g=0); for (i=1, oo, my (f=fibonacci(i)); if (f>=2^(n+1), return (g), g=f))

a(n) = {
	my (v=0);
	for (k=0, oo,
		if (n==0,
				return (v),
			bittest(n, k),
				v=bitxor(v, A340400(k));
				n-=2^k;
		);
	);
}

for (n=0, 2^13-1, print (n " " a(n)))

quit