# how many squares there were in the nth figure of the sequence, expressed in terms of n.

The first three elements of a sequence of figures made up of squares are shown. Students were asked how many squares there were in the nth figure of the sequence, expressed in terms of n. If only given three numbers, must be multiple solutions, but given the numbers, plus graphics, may not be. This problem, I am not sure, ask for advice everyone

-
Are you only looking for 1x1 squares or all squares? – Mike May 2 '12 at 12:21
only looking for 1x1 squares – tianzhidaosunyouyu May 2 '12 at 13:06

Let $S_n$ be the $n$-th figure. The top $n$ rows of $S_n$ contain $1,3,\dots,2n-1$ squares; these are the first $n$ odd numbers, and it's well-known that their sum is $n^2$. (This can be proved in a number of ways, including induction on $n$.) The bottom $n-1$ rows contain $1,3\dots,2n-3$ squares, the first $n-1$ odd numbers, whose sum is $(n-1)^2$. The total number of squares is therefore $$n^2+(n-1)^2=2n^2-2n+1\;.$$
@tianzhidaosunyouyu: The sequence $\langle 1,5,13,\dots\rangle$ could be continued in many different ways, but the pictures make it clear what pattern is intended: each picture just adds an extra 'layer' of squares around the previous picture. It's reasonable to assume that this pattern will continue, and if it does, there is only the one possible solution. – Brian M. Scott May 2 '12 at 16:28