Take into account that x is the number of the step, and f(x) the number of squares.
The relation in between the step and the number of squares is:
1 => 1
2 => 4
3 => 9
the function that best represt the prvious relation is:
f(x) = x²
in fact, you have:
f(1) = 1² = 1
f(2) = 2² = 4
f(3) = 3² = 9