OFFSET
1,2
COMMENTS
This sequence written in decimal is A139706.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
EXAMPLE
For n = 14: 14 = 1110 in binary. Rotate once to the right, getting 0111. The leftmost digit is a 0, so rotate again to the right, getting 1011. A 1 is the leftmost digit, so stop here. a(14) therefore is 1011 (which is 11 in decimal).
MATHEMATICA
Table[FromDigits[NestWhile[RotateRight[#]&, RotateRight[IntegerDigits[n, 2]], #[[1]] != 1&]], {n, 40}] (* Harvey P. Dale, Oct 26 2016 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Leroy Quet, Apr 30 2008
EXTENSIONS
Extended by Ray Chandler, Jul 01 2009
STATUS
approved