The solution to the extra credit problem from Homework 2
can be found in the following paper:
"On the recognition of primes by automata"
Journal of the ACM, 15:3, pp. 382-389, 1968.
The solution to the extra credit problem from Homework 3
can be found in the following paper:
Shannon, C. E. "A universal Turing machine with two internal states"
Automata Studies, pp. 129-153, Princeton University Press,
Princeton, NJ, 1956.