Move the top two to the spare peg in 3 moves, move the big disc across in 1, then move the top two back on top of it in 3 more. Every disc you add doubles it and adds one, so for n discs it’s 2 to the power of n, minus 1.