Created with Graphviz, with the help of this Python program:
dotfile = file('collatz-graph.dot', 'w')
limit = 30
def f(n):
if n % 2 == 0:
return n / 2
else:
return 3*n + 1
explored = set([1,27]) # 27 has a long convergence, so skip it
dotfile.write('digraph {\n')
for n in range(2, limit):
while n not in explored:
dotfile.write(str(n) + ' -> ')
explored.add(n)
n = f(n)
dotfile.write(str(n) + ';\n')
dotfile.write('}\n')
이 작품은 저작자인 I, Keenan Pepper에 의해 퍼블릭 도메인으로 공개된 작품입니다. 이 공개 선언은 전 세계적으로 유효합니다. 만약 저작권의 포기가 법률적으로 가능하지 않은 경우, I, Keenan Pepper은 이 작품을 법적으로 허용되는 한도 내에서 누구나 자유롭게 어떤 목적으로도 제한 없이 사용할 수 있도록 허용합니다.
Directed graph showing the orbits of the numbers less than 30 (with the exception of 27 because it would make it too tall) under the Collatz map. For a larger graph containing only odd numbers, see [[:Image:Collatz-graph-300.sv