Find the nth Carol Number.
A Carol number is an integer of the form 4n – 2(n+1) – 1. An equivalent formula is (2n-1)2 – 2.
First line of input contains the number of test cases. Only line of each test case contains a single integer n.
Print the nth Carol number mod 109 +7
1 <= T <= 106
1 <= N <= 109
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.