One way to begin thinking about this is to collect together some outputs and their corresponding inputs:
Finishing Number |
Starting Number |
|
|
|
|
|
|
|
|
|
|
Can you write each step of the machine's instructions as a function machine?
What happens if you work backwards?