Sequence Fun
Submissions: 747   Accuracy:

16.37%

  Difficulty: Easy   Marks: 2

You have a sequence 2,5,16,65,........Given an integer n as input ,you have to find the value at Nth position in the sequence. For example if N=1 then 1st value in sequence is 2 ,so '2' should be your answer.

Input:
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case contains an integers N as input. 

Output:
For each test case, print number at Nth position in the sequence in new line as your answer.

Constraints:
1<=T<=100
1<=N<=100

Example:
Input:
2
4
7

Output:
65
13700

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

Contributor: RIYA BHARDWAJ
Author: Riya Bhardwaj


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.