Showing:
Handle Score
@Ibrahim Nash 5761
@akhayrutdinov 5111
@mb1973 4989
@Quandray 4944
@saiujwal13083 4506
@sanjay05 3762
@marius_valentin_dragoi 3516
@sushant_a 3459
@verma_ji 3341
@KshamaGupta 3318
Difference series
Basic Accuracy: 52.14% Submissions: 328 Points: 1

Given a series of numbers  3,10,21,36 …., and series starting from N = 1, find the pattern and output the N'th value of the above series.

Example 1:

Input:
N = 1
Output:
3
Explanation:
3 is the first term of the series.

Example 2:

Input:
N = 2
Output:
10
Explanation:
10 is the second term of the series.

You don't need to read input or print anything. Your task is to complete the function differenceSeries() which takes an integer N as input parameter and returns the N'th term of the series.

Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)

Constraints:
1 ≤ n ≤ 100