In the sequence 0, 1, 1, 3, 6, 9, 27, ..., the first term is 0. Subsequent terms are produced by alternately adding and multiplying by each successive integer beginning with 1. For instance, the second term is produced by adding 1 to the first term; the third term is produced by multiplying the second term by 1; the fourth term is produced by adding 2 to the third term; and so on. What is the value of the first term that is greater than 125?
125 isn't too big of a number, so we can just use brute force. (If anyone else has a better solution, please attach it below.)
0, 1, 1, 3, 6, 9, 27, 31, 124, 129
The first term greater than 125 is 129