modified problem 12, tri numbers