I want to make a series using Numpy. For example, starting with the value n = 2
I want to create the series:
terms = numpy.array([2, 6, 24, 120, 720,...])
where each successive term multiplies the previous term by the first term in the series, added to an incrementing index. For example, the above would be
terms[1] = terms[0] * (terms[0] + 1)
terms[2] = terms[1] * (terms[0] + 2)
terms[3] = terms[2] * (terms[0] + 3)
terms[4] = terms[3] * (terms[0] + 4)
Can this be done with Numpy? If not, what is the cleanest way that this can be done without a for-loop?