OFFSET
1,2
COMMENTS
This sequence written in binary is A139707.
This is a permutation of the positive integers. A139708 is the inverse permutation.
Moreover, the first 2^n terms are a permutation of the first 2^n positive integers. Fixed points of the permutation are A272919. - Ivan Neretin, May 10 2016
LINKS
MAPLE
A139706 := proc(n) local a; a := ListTools[Rotate](convert(n, base, 2), 1) ; while op(-1, a) = 0 do a := ListTools[Rotate](a, 1) ; od: add(op(i, a)*2^(i-1), i=1..nops(a)) : end: seq(A139706(n), n=1..100) ; # R. J. Mathar, May 04 2008
MATHEMATICA
Table[FromDigits[RotateRight[IntegerDigits[n, 2], IntegerExponent[n, 2] + 1], 2], {n, 72}] (* Ivan Neretin, May 10 2016 *)
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Leroy Quet, Apr 30 2008
EXTENSIONS
More terms from R. J. Mathar, May 04 2008
STATUS
approved