Hofstadter Q sequence by smkt

main(){int q[999]={1,1},n=2;printf("1\n1\n");while(n<300)q[n]=q[n-q[n-1]]+q[n-q[n-2]],printf("%d\n",q[n++]);}

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

download

return to the top page