Harvey transforms a four-digit number by reversing the order of its digits, subtracting 1 from all digits that are 1 more than a multiple of 3, and adding 1 to all even digits in that order. Harvey obtains 7793 after transformation. Find the number of distinct numbers that he could have transformed. (MAT 2021 Sample Question 2)
I first noted that since all the digits of $7793$ are odd, Harvey must have added $1$ all of the digits, so the number prior to the last transformation was $6682.$ Then, since the second transformation must have turned each digit into a multiple of three, I added $1$ to each $6$ to give me $7782.$ Then, I reversed the digits to get $2877,$ which appears to be the only solution.
However, the sample solutions state that the answer is actually $24.$ Can somebody explain where I messed up?
A digit $7$ in the final number may be the result of adding one to the even digit $6$, or by leaving the odd digit $7$ as is.
If we ignore the first step (digit reversal), which is reversible, you may perhaps check what a digit $0$, digit $1$, ... , digit $9$ turn into after the second and third step - which of these become $7$ or $9$ or $3$?