Created
August 8, 2011 05:22
-
-
Save johnlettman-old/1131257 to your computer and use it in GitHub Desktop.
Collatz Conjecture for TI 89 Calculators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Input Q | |
int(Q)→Q | |
Lbl ITERATE | |
If Q≠1 | |
Then | |
If (Q/2)=int(Q/2) | |
Then | |
(Q/2)→Q | |
Disp Q | |
Goto ITERATE | |
Else | |
(Q*3)+1→Q | |
Disp Q | |
Goto ITERATE | |
End |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment