Twin primes by tabasa

def pr a\x0d
(a/6).times{|i|c=i*2+3\x0d
if a==a/c*c \x0d
return false\x0d
end\x0d
}\x0d
true\x0d
end\x0d
def ok a\x0d
pr(a)&&pr(a+2)\x0d
end\x0d
999.times{|i|a=i*2+3\x0d
if ok(a)then print a,",",a+2,"\n"\x0d
end\x0d
}

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

download

return to the top page