Different Series

Recursion Contest Easy

Return the nth term of the series given by:

  • xi = i + xi-1 + 1, where n1 is the 1st term of the series and has value = 1.

Constraints

  • 1 <= n <= 1000

Company Tags

[ ]