# Eight zeros are written on a blackboard...

Eight numbers, all of them zero, are written on a blackboard. Each move, 4 of the 8 numbers are randomly chosen, say $$a,b,c$$ and $$d$$ and replaced with $$a+3,b+3,c+2$$ and $$d+1$$ respectively.

Find all positive integers $$n$$ for which it is possible after some moves that there are eight consecutive numbers on the blackboard, the smallest of which is $$n$$.

My working: Each move, the sum of the numbers increase by 9. Sum of 8 consec. numbers are multiple of 4. Hence the sum of 8 consecutive numbers after some moves must be a multiple of lcm$$(4,9)=36$$

• The sum is $8 n + 28$. This is equal to $-n+1 \text{mod} 9$. Hence $n = 1 \text{mod} 9$ for a first necessary condition. Commented Nov 22, 2021 at 11:33

As Gribouillis said the sum is $$8n+28$$. This is multiple of $$4$$, but not of $$8$$. Then, as $$9m=8n+28$$, using the same argument you used, the possible values are $$36+72k$$.

Now, it is easy to obtain the solution $$99999999$$. For example, if we consider the first 4 digits: $$0000\rightarrow3321\rightarrow4554\rightarrow7866\rightarrow9999$$. (You obtain $$99999999$$ repeating the same in the other digits).

Then, if you have a solution for $$k=0$$ (hence, for $$12345678$$) you will have a solution for $$k=1$$ (adding up $$99999999$$). And, by induction, for any $$k\geq 0$$.

Hence, we have reduced the problem to solve $$12345678$$. You can try to solve it or see the spoiler below:

\begin{align} 00000000 \ (+ 12330000) \\12330000 \ (+00010233)\\12340233\ (+00002133) \\ 12342366 \ (+00003312) \\ 12345678 \ (+00003312) \end{align}

Pd: This is my first post here, hope everything is clear because my MathJax skills are not the best :)

• Thank you, very helpful! Commented Nov 23, 2021 at 7:13