João is playing a game where the only allowed operation is to replace the natural number $n$ with the natural number $a \cdot b$ if $a+b=n$, with $a$ and $b$ being natural numbers. For example, if the last number obtained was 15, he can replace it with $56=7 \cdot 8$, since $7+8=15$ and both are natural numbers.

a) Starting with the number 7, show a sequence of operations that produces the number 48.

b) Starting with the number 7, show a sequence of operations that produces the number 2014.

#
Solution

a) Let's indicate the swap operations with an arrow $(\rightarrow)$. One way would be:

$$
7=2+5 \rightarrow 10=2+8 \rightarrow 16=12+4 \rightarrow 48
$$

b) Since $n=(n-1)+1$, it is possible to decrease $n$ by one unit, transforming it into $1 \cdot(n-1)=n-1$. Therefore, a good strategy would be to create a number larger than 2014 and then use the previous operation to decrease it by one unit at a time until we obtain the number 2014. To get a number larger than 2014, do:

$$
7=2+5 \rightarrow 10=5+5 \rightarrow 25=12+13 \rightarrow 156=100+56 \rightarrow 5600
$$

Now we just need to decrease it by one unit $5600-2014=3586$ times.

Certainly, there are faster ways that use fewer instances of the described operation. One of them would be:

$$
7=2+5 \rightarrow 10=9+1 \rightarrow 9=4+5 \rightarrow 20=7+13 \rightarrow 91=38+53 \rightarrow 2014
$$