EKG Sequence by bk1e

i,j,c,z;x[200];g(a,b){while(b)c=a,a=b,b=c%b;return a;}main(){for(i=1;i<101;++i){for(j=1;j<200;++j)if(!x[j]&&g(j,z)>1){x[j]=1,z=j;break;}if(i<3)z=i;printf("%d\n",z);}}

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

download

return to the top page