Let there be a square matrix, where each square is a rectangle, and a combination of more squares are also rectangles. To find the number of rectangles, Pete sat down and started counting... but that's highly inefficient.
Create a function that takes the order of the matrix as input and returns the number of rectangles in them.
rectangles(1) ➞ 1
rectangles(2) ➞ 9
rectangles(3) ➞ 36
((n(n+1))/2)^2