Here we observe that the second row gives the number of white squares added at each level, and the third row is a constant, that is, 4.
Now we will first find the formula for the white squares and after that the formula for the total squares. Subtracting from the total squares the number of white squares we will get the number of black squares.
Let us find the pattern in counting all the squares. In Pattern 1 we can see first two rows contain 1+3=4 squares. If we consider the last two rows then they also contain 1+3=4 squares. We are counting the three squares in the middle row two times so we have to subtract them from the total to get the total number of squares in the pattern. So we get
In Pattern 2 the first three rows contain 1+3+5=9 squares. Similarly the last three rows contain 9 squares. We are counting the five squares in the middle row two times so we have to subtract them to get the total number of squares in the pattern. So we