Keywords: Collatz-graph-300.svg validSVG Directed graph showing the orbits of all the odd numbers less than 300 under the Collatz map Created with Graphviz with the help of this Python program dotfile file 'collatz-graph dot' 'w' limit 300 def f n while n 2 0 divide by 2 until it's odd n / 2 n 3 n + 1 while n 2 0 n / 2 return n explored set 1 dotfile write 'digraph \n' for n in range 3 limit 2 odd numbers while n not in explored dotfile write str n + ' -> ' explored add n n f n dotfile write str n + ';\n' dotfile write ' \n' Collatz conjecture |