Farey sequence by pooq

a:=0;c:=b:=1;n:=d:=File standardInput readLine asNumber
while(a<=b,writeln(a,"/",b);u:=a;v:=b;a=c;b=d;c=(k:=(n+v)/d|0)*c-u;d=k*d-v;)

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

download

return to the top page