How can I write (in pseudocode) a program that halts only if the Collatz Conjecture is false ?
Here is pseudocode for the case that it is true:
function collatz(n)
while n > 1
show n
if n is odd then
set n = 3n + 1
else
set n = n / 2
endif
endwhile
show n
Thanks much in advance!