Complete the square sum function so that it squares each number passed into it and then sums the results together.
You have to write a function pattern which returns the following Pattern (See Pattern & Examples) up to n number of rows. Note: Returning the pattern is not the same as Printing the pattern.