The hanoi quistion

We should calculate the number of the moves with gray code or https://discourse.aakashjog.com/something else?