A perhaps weaker question is whether this map eventually loops.
We can explain this better as follows. Let and define
if
is even and
if
is odd. We can now ask if this map "loops". In other words, is there always a pair of natural numbers
and
so that
? It is not obvious that this question is the same as the Collatz sequence question.
In fact, we can define more general maps as follows. Fix a "base" . Starting with
we put
if
is divisible by
; other wise, let
be the remainder of
on division by
and put
. Note that in the second case
is divisible by
. So every two steps
is at most about
times
. We can ask the same question about this map.
Write a program to find "loops".