Step-by-step explanation:
the number of moves needed goes along with the power of 2 (minus 1).
with 1 disk we need 1 move (2¹ - 1).
with 2 disks we need 3 moves (2² - 1).
with 3 disks we need 7 moves (2³ - 1).
with 4 disks we need 15 moves (2⁴ - 1).
with 5 disks we need 31 moves (2⁵ - 1).
and so on.
for p disks we have to move the previous smaller tower (p-1 disks) one time to the middle pole, then move the additional disk to the 3rd pole, and then move the p-1 tower a second time now to the 3rd pole.
in other words, the p-disk tower has to move the p-1-disk tower twice plus the one move of the pth disk.
so,
mp = 2×mp-1 + 1
therefore,
m(p+1) = 2×m + 1