Product or sum of a sequence of natural numbers