Example: \$4\rightarrow5\rightarrow6\$ is transformed asturned into \$[0,\color{red}9,6]\$ and then \$[0,0,\color{red}{15}]\$.
But when several values in a row are attracted by their left neighbor, we need to add \$a_i\$ to the first attractor \$a_k\$ of thethis sequence (with \$k<i\$) rather than simply \$a_{i-1}\$.
Example: \$6\leftarrow5\leftarrow4\$ is transformed asturned into \$[\color{red}{11},0,4]\$ and then \$[\color{red}{15},0,0]\$.