Given a series with starting 6 members of the series. Given an integer n find the nth term of this series.
Series: 7, 15, 32, 67, 138, 281, ............
Input : 7 Output : 568
First line of the input contains an integer T, denoting the number of test cases. Then T test case follows. The only line of the test case contains an integer N.
For each test case print the nth term of the series in a new line.Print the answer modulo 10^9 +7.
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.