n%1=1n%t=1+n%(2*t`mod`n)answer=(%2) main = mapM_ (\i -> print (i, answer i)) [3,5..20]
Standard input is empty
(3,2) (5,4) (7,3) (9,6) (11,10) (13,12) (15,4) (17,8) (19,18)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!