Collatz Parity by AndoDaan(author)

function e(n)if n%2==0 then return' 'else return'#'end end\x0d
function s(n)if e(n)=="#"then n=(n*3+1)end return n/2 end\x0d
for i=256,-256,-1 do p=""n=i for k=1,64 do p=p..e(n)n=s(n)end print(p.."|")end\x0d

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

download

return to the top page