Numbers 5,7,9 are written on the whiteboard. In one move, we choose two numbers $a,b$ and and add a new number $5a-4b$ to the whiteboard... [closed]

Numbers 5,7,9 are written on the whiteboard. In one move, we choose two numbers $a,b$ and and add a new number $5a-4b$ to the whiteboard. Is it possible to get the number $2021$ on the whiteboard after a set number of moves?

I honestly have no idea how to start. I've tried looking at congruencies and remainders to try and prove it's impossible but I've gotten nowhere. Hints are appreciated. :)


No. You cannot reach 2021 through this method.

First, let's see what we get when applying this function to all pairs of numbers that we start with (letting our rows be $a$ and columns be $b$).

$$\begin{array}{c|c|c|} & 5 & 7 & 9\\ \hline \text{5} & 5 & -3 & -11\\ \hline \text{7} & 15 & 7 & -1\\ \hline \text{9} & 25 & 17 & 9 \\ \hline \end{array}$$

Let's see the same table again, but with each number taken$\mod 10$.

$$\begin{array}{c|c|c|} & 5 & 7 & 9\\ \hline \text{5} & 5 \mod 10 \equiv 5 & -3 \mod 10 \equiv 7 & -11 \mod 10\equiv 9\\ \hline \text{7} & 15 \mod 10 \equiv 5 & 7 \mod 10 \equiv 7 & -1 \mod 10\equiv 9\\ \hline \text{9} & 25 \mod 10 \equiv 5 & 17 \mod 10 \equiv 7 & 9\mod 10 \equiv 9 \\ \hline \end{array}$$

As you can see, for any numbers we choose, $(5a-4b)\mod 10 \equiv 5 \mod 10, 7 \mod 10,$ or $9 \mod 10$. As $2021\mod 10 \equiv 1 \mod 10$, we cannot reach it with this set of numbers.