Goldbach partition by twice11

s=show
p x=all((/=0).mod x)[2..x-1]
l x=putStrLn$concat$s(2*x):":":[' ':s a++'+':s(2*x-a)|a<-[2..x],p a,p$2*x-a]
main=mapM l[3..150]

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

download

return to the top page