Another speed enhancement, bugfix

I updated the algorithm, fixed a bug for n = 0 (again) and enhanced the Turing machine in terms of readability (results are now bitflipped).