Given a number N, find the N^{th} term in the series 1, 3, 6, 10, 15, 21…
 
Example 1:
Input :
N = 4 
Output:
10
Explanation:
The 4^{th} term of the Series is 10.
Example 2:
Input :
N = 3 
Output:
6
Explanation:
The 3^{rd} term of the Series is 6.
 
Your Task:
You don't need to read input or print anything. Your task is to complete the function findNthTerm() which takes an Integer N as input and returns the answer.
 
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
 
Constraints:
1 <= N <= 10^{4}

Source: geeksforgeeks | Difficulty: EASY
Tags: Mathematics

Starter code: #User function Template for python3

class Solution:
    def findNthTerm(self, N):
        # code here 

Solutions:
class Solution:

	def findNthTerm(self, N):
		return int(N * (N + 1) / 2)


class Solution:

	def findNthTerm(self, N):
		return (N * N + N) // 2


class Solution:

	def findNthTerm(self, N):
		return round(N * (N + 1) / 2)


class Solution:

	def findNthTerm(self, N):
		ans = N * (N + 1) // 2
		return ans


class Solution:

	def findNthTerm(self, n):
		return n * (n + 1) // 2


class Solution:

	def findNthTerm(self, N):
		a = N
		b = a + 1
		nth = a * b // 2
		return nth


class Solution:

	def findNthTerm(self, N):
		index = range(1, N + 1)
		o_sum = 0
		if N > 1:
			o_sum = (N - 1) / 2 * (2 * 2 + (N - 2)) + 1
		else:
			o_sum = 1
		return int(o_sum)


class Solution:

	def findNthTerm(self, N):
		k = N
		return k * (k + 1) // 2


class Solution:

	def findNthTerm(self, N):
		if N % 2 == 0:
			return int(N / 2) * (N - 1) + N
		else:
			return int(N / 2) * N + N


class Solution:

	def findNthTerm(self, N):
		a = N * (N + 1) / 2
		b = int(a)
		return b


class Solution:

	def findNthTerm(self, N):
		sum = 0
		sum = N * (N + 1) // 2
		return sum


class Solution:

	def findNthTerm(self, N):
		return 1 + sum(range(2, N + 1))


class Solution:

	def findNthTerm(self, n):
		s = n * (n + 1)
		k = s // 2
		return k


class Solution:

	def findNthTerm(self, N):
		k = range(1, N + 1)
		return sum(k)


class Solution:

	def findNthTerm(self, N):
		a = N * (N + 1) // 2
		return a


class Solution:

	def findNthTerm(self, N):
		n = int(N)
		term = n * (n + 1) / 2
		return int(term)


class Solution:

	def findNthTerm(self, n):
		ans = int(n * (n + 1) / 2)
		return ans