BETA

Difficulty Level:

Easy

Total Submissions: 160 Accuracy:

6.25%

Carol Numbers
       

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.

Input:
First line of input contains the number of test cases. Only line of each test case contains a single integer n.

Output:
Print the nth Carol number mod 1000000007

Constraints:

1<=T<=10^6

1<=N<=10^9

Example:
Sample Input:
2
2
4

Sample Output:

7
223 

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

Contributor: jain_rishabh

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.