OFFSET
0,4
COMMENTS
Iterations of a(n) always reach 0 (cf. A326732), see Problem 5 of IMO 2019.
LINKS
International Mathematical Olympiad, Problem 5 of IMO 2019.
PROG
(PARI) A326731(n) = if(n==0, return(0)); my(b=binary(n)); bitxor(n, 2^(#b-vecsum(b)));
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Max Alekseyev, Jul 22 2019
STATUS
approved