Interesting Series
Submissions: 352   Accuracy:

35.55%

  Difficulty: Easy   Marks: 2

Given a series of numbers  6 , 14, 36, 98, 276... Identify the pattern in the series and help to identify integers at other indices. Indices are starting from 1.

Input:  The first line of the input contains an integer T denoting the number of test cases. The description of each testcase follows. Each test case contains a single line with 1 integer X (index) .


Output:  For each test case output a new line with a single integer which should be the the number at the Xth index .


Constraints:  1 ≤ T ≤ 200
                     1 ≤ X ≤ 200


Example:     

Input:
4

12
45
67

Output:

6818
535538
2954312741735205787476
92709463148045411038351601823516

 

Explanation:
In the first testcase contains the number 8 , which means we have to find the number at the 8th index of the given series .

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

Contributor: Diksha Singhal
Author: diksha1812


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.