This can be transformed into a problem with pegs and moving blocks.
Like tower of hanoi[1], but you can add or remove empty pegs, blocks are the same size and can be stacked in any order, you can move as many blocks as you want and you cannot have towers with the same amount of blocks.
Unless you want to deal with negative integers, then it would get more tricky.
Like tower of hanoi[1], but you can add or remove empty pegs, blocks are the same size and can be stacked in any order, you can move as many blocks as you want and you cannot have towers with the same amount of blocks.
Unless you want to deal with negative integers, then it would get more tricky.
[1]: https://en.m.wikipedia.org/wiki/Tower_of_Hanoi