A function f is defined as follows F(n)= (1) +(2*3) + (4*5*6) ... n. Given an integer n the task is to print the F(n)th term.
Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test contains an integer n.
Output:
For each test case print the nth term of the sequence. .
Constraints:
1<=T<=100
1<=N<=10
Example:
Input:
2
5
7
Output:
365527
6006997207
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.
mr_kksparrow | 433 |
manvirag982 | 272 |
snow_den_ | 236 |
arpit_anshuman | 228 |
Exception_404 | 220 |
blackshadows | 5331 |
Ibrahim Nash | 5219 |
akhayrutdinov | 5111 |
mb1973 | 4929 |
Quandray | 4567 |