Hofstadter Q sequence by o-cn

for(q=a=i=[];i++<300;)print(a=q[i]=q[i-a]+q[i-q[i-2]]||1)

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

download

return to the top page