Solves task 5 sums int sequence