The number of moves to complete the puzzle can be represented in a table.
If we work out the number of moves for the first, say, 4, then we can find a formula. If there are equal amounts of frogs per side, then for one frog it is 3, two:8, three:15, four:24
This does not go up with regular intervals, so it must be a quadratic sequence, or more complicated.
This first difference (difference between consecutive terms, is:
5,7,9
The second difference (difference between consecutive first differences) is:
2,2,2 (As the second difference is equal, it is quadratic)
2/2 = 1 (the co-efficient of x^2)
Sequence: 3 8 15 24
x^2 4 9 16 25 (These are square numbers)
Therefore the sequence for equal frogs on each side is (n + 1)2 - 1
(When n=number of frogs per side)
This formula, basically, applies to uneven number of frogs/toads too
Using a similar method to before, as shown on the spreadsheet, we get
((f+1)*(t+1))-1 This formula works for all examples*
*Including those with equal numbers of frogs and toads. However, the numbers of frogs/toads can be simplified into one variable then, as they are equal, whereas they may not be here.