(16C) Collatz conjecture
|
12-22-2021, 01:41 PM
Post: #1
|
|||
|
|||
(16C) Collatz conjecture
Starting with any positive integer, repeat the following operation
- If the number is even, divide it by two. - If the number is odd, triple it and add one. The conjecture is, this process will always reach the number one. The HP16-C has the shift an rotate operations in integer modes, which are useful for this kind of programs. Code: f SR Code: f SL Show the Collatz sequence: Code: 001 43,22, C g LBL C Usage: enter a positive number GSB C Example: 7 GSB C shows 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 0 |
|||
12-22-2021, 04:08 PM
Post: #2
|
|||
|
|||
RE: (16C) Collatz conjecture
Hello!
For more background you can watch this video: https://www.youtube.com/watch?v=094y1Z2wpJg I saw it by chance a couple of weeks ago (not really by chance as I watch nearly all videos from Derek Muller). Regards Max |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)