as the sum of
From this, I can express
with the smallest positive integer coefficients modulo 10.
So, as an example, if I know that my 2nd row contains elements "2", then I know my entries in my result row are
(It'll be a row of 4's.)
When adding rows, the process can be simpler using coordinate forms instead of writing out r_i's for each row, and if I 'drop the 10's' along the way. For example,
has the same remainder as
modulo 10. I don't show this here, but it was a good verification step to ensure my last row was correct.
To be aware of the cycle that exists, simply set rows
EDIT:// Expressed in a more elementary way that doesn't use modulo but means the same thing:
The last digits of
is what we'd see as a result of the operation described in the problem, for each entry.