Calculates the sum of 16 numbers to the value of n within a 4x4 matrix