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.
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.
For each test case, output the nth value of above series.
1 ≤ T ≤ 100
1 ≤ n≤ 100
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.