Skip to content

Instantly share code, notes, and snippets.

@johnlettman-old
Created August 8, 2011 05:22
Show Gist options
  • Save johnlettman-old/1131257 to your computer and use it in GitHub Desktop.
Save johnlettman-old/1131257 to your computer and use it in GitHub Desktop.
Collatz Conjecture for TI 89 Calculators
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