completes project euler 1 and adds sum_array method