Calculates the sum of the squares from 1 to the entered number