OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
MATHEMATICA
s[n_] := s[n] = If[OddQ[n], 2*s[(n - 1)/2] + 1, If[EvenQ[IntegerExponent[n, 2]], n/2, 2*n]]; FromDigits[IntegerDigits[#, 2]]& /@ Array[s, 50] (* Amiram Eldar, Jul 22 2023 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reinhard Zumkeller, May 27 2003
STATUS
approved