|
|
A259656
|
|
Let f(x) be the absolute value of the difference between x and its base-2 reversal. a(n) is the number of times f(x) must be applied starting with n for the result to be 0.
|
|
2
|
|
|
1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 4, 3, 4, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 1, 4, 3, 2, 3, 4, 3, 4, 3, 2, 3, 2, 1, 2, 1, 2, 3, 2, 3, 2, 3, 2, 1, 2, 3, 2, 3, 2, 3, 4, 3, 2, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
First differences appear to always be odd.
More precisely, a(n) is even if n is even and a(n) is odd when n is odd. This is an immediate consequence of the parities in A055945 (which represents f apart from the sign) and the fact that we count iterations of f until the result is even. - Jörgen Backelin, Nov 04 2015
|
|
LINKS
|
|
|
MAPLE
|
local f, a ;
f := n ;
a := 0 ;
while f <> 0 do
a := a+1 ;
end do:
a;
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|