Collatz問題 #7

もっと広い範囲について初期値と操作回数の関係を見てみる。
16ビット無符号整数で表せる初期値全てに対する操作回数のプロットを行う。

...snip
    while (mpz_cmp_ui(x, 65536UL) <= 0) {
...snip
$ collatz > i65536.dat
$ gnuplot
gnuplot> set xlabel 'initial number'
gnuplot> set ylabel 'number of iterations'
gnuplot> unset key
gnuplot> set logscale x
gnuplot> set terminal png
gnuplot> set output 'i65536-l.png'
gnuplot> plot 'i65536.dat' every 2 pt 7 ps 0.5, 'i65536.dat' every 2::1 lt 3 pt 7 ps 0.5
gnuplot> set output
gnuplot> 


前回の初期値100以下の場合と同様にプロット点がきれいに配置された網点構造になっている。
前回のチャートでの操作回数100回前後の点群が一つの構造からの突出部だったということが分かる。
こうした突出部があるなど操作回数の上限についてはその構造がはっきりしないが、
下限については前に述べたように2の冪乗点が並んだ直線で示されている。