Sum-to-n loop  exercise (includes description of Gauss's short function)