Numloop by uru

var n,m,s:comp;begin
repeat
s:=0;inc(n);m:=n;repeat
if odd(m)then m:=6*m+2else
m:=(3and m+m)div 4;inc(s)until m in[1,7];if
m=7then write('Infinity')else write(s-1div n*3);writeln(', ',n)until n>998end.

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page