Main diagonal sum and how many numbers are repeated in the array