Hofstadter Q sequence by hakusui

for(q=[n=0];++n<301;)print(r=q[n]=n<3?1:q[n-r]+q[n-q[n-2]])

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

download

return to the top page