Hofstadter Q sequence by Hendrik

q={1,1}print"1\n1"
for n=3,300 do table.insert(q,q[n-q[n-1]]+q[n-q[n-2]])print(q[n])end

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

download

return to the top page