OFFSET
0
COMMENTS
Since, for n>=2, f(n)<n, the number of iterations required to reach 0 or 1 is finite.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 0..10000
MAPLE
f := proc(n) local i, b, v: v:=0: if(n=1)then return 1: fi: b:=convert(n, base, 2): for i to nops(b)-1 do v:=v+((b[i]+b[i+1]) mod 2)*2^(i-1): od: return v: end: a:= proc(n) local v: v:=n: while(v>1)do v:=f(v): od: return v: end: seq(a(n), n=0..104); # Nathaniel Johnston, Jun 30 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev, Jun 23 2011
STATUS
approved