Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Collatz conjecture
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===As an abstract machine that computes in base two=== Repeated applications of the Collatz function can be represented as an [[abstract machine]] that handles [[string (computer science)|strings]] of [[bit]]s. The machine will perform the following three steps on any odd number until only one {{mono|1}} remains: # Append {{mono|1}} to the (right) end of the number in binary (giving {{math|2''n'' + 1}}); # Add this to the original number by binary addition (giving {{math|2''n'' + 1 + ''n'' {{=}} 3''n'' + 1}}); # Remove all trailing {{mono|0}}s (that is, repeatedly divide by 2 until the result is odd). ====Example==== The starting number 7 is written in base two as {{mono|111}}. The resulting Collatz sequence is: <div style="font-family:monospace"> 111 <u>111'''1'''</u> 1011<s>0</s> <u>1011'''1'''</u> 10001<s>0</s> <u>10001'''1'''</u> 1101<s>00</s> <u>1101'''1'''</u> 101<s>000</s> <u>101'''1'''</u> 1<s>0000</s> </div>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)