The condition to find the nth term in the given series is ((n * n) + n) / 2, but using in the code gives garbage value. What\'s wrong in here, as it looks pretty simple to me!