Difference series
Submissions: 3894   Accuracy:

59.98%

  Difficulty: Basic   Marks: 1

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

Input:
The first line of the input contains a single integer T denoting the number of test cases.
The first line of each test case contains n.

Output:
For each test case, output the nth value of above series.

Constraints:
1 ≤ T ≤ 100
1 ≤ n ≤ 100

Example:
Input:

4
1
2
3
4

Output:
3
10
21
36

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: CHANDRAKANT
Author: TheRed_Viper


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.