In this question, functions on natural numbers that are computable by a computer (which has a finite memory and output) for arbitrary large numbers are investigated. These functions are called Computable Functions. Since a computer has a finite number of outputs, the investigation is restricted only to those functions that have a finite range (which is equivalent to all possible finite outputs of a computer). Next, the method by which a number is given to a computer needs to be clarified. A common way is using the representation of numbers in a fixed base .
By determining the inputs and outputs of a computer, a mathematical model can be derived to describe (i.e. to model) its operation. The main idea here is that a computer has a finite number of states (considering the states of all inner components) and it changes after receiving each input digit according to a predefined program. Consequently, the output is a function of the computer's state. Using these concepts a precise definition of a -Computable sequence can be given.
First, a Machine needs to be defined. A Machine with input set and output set (sets and are finite) comprises a finite number of states and an algorithm that determines the state of the Machine after an input (which is an arbitrary member of ) is entered. Also, each state of the Machine determines a member of as the output. Moreover, a specific state, called the Starting State, is used to start the Machine. A Machine of this kind can determine a member of as the output for a finite sequence of entries from . This can be done by setting the Machine to its Starting State and then entering the inputs from the sequence one by one. The output of the final state is considered as the computed value.
Let be a natural number greater than 1. A sequence with values in the finite set is called -Computable if there exists a Machine with input set and output set such that when digits of an arbitrary number in base are entered to the Machine from right to left, respectively, the Machine's output is .
As an example, consider the following Machine for (circles represent states and the output of each state is written on it. This Machine receives 0 and 1 as inputs).
Using this Machine the sequence can be computed. For example, for , 0, 1, 0 and 1 should be given to the Machine starting from its Starting State. If this is done, the lower left state is reached which gives as the output. According to the definition, the sequence is 2-Computable.
a) Suppose is a natural number. For each natural number , define as the remainder of when divided by (so values of this sequence are all in the finite set ). Prove that for each natural number , this sequence is -Computable.
b) Prove that if sequence is -Computable, so are sequences and that are defined as and .
c) Define sequence to be 1 for perfect square natural numbers and 0 for the rest. Is this sequence 3-Computable?
d) The definition of Computable sequences can be altered by assuming that the digits are given to the Machine from left to right. These sequences are called -Left Computable. Prove that this definition is equivalent to the previous one, i.e. a sequence is -Computable if and only if it is -Left Computable.