math.randomseed(os.time())
local iter = 1
local start = math.random(0,999999)
local f = false
function col(a)
if f then return a end
iter = iter + 1
if a<=1 then
print("finished. iterations:", iter, "start number:", start)
f = true
return a
else
print(a, iter, math.fmod(a, 2))
if math.fmod(a, 2)==0 then
return col(a/2)
else
return col((a*3)-1)
end
end
end
print(start)
col(start)
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.