Summing N series

0

0 votes
Easy
Problem

You are given a sequence whose  term is

    T(n)=n^2-(n-1)^2

You have to evaluate the series

    S(n)=T(1)+T(2)+T(3)+.....+T(n)
Find S(n) mod 10^9+7.

Note: In mod a=b+c is wriien as a=(b%mod+c%mod)%mod.
      And a=b*c is a=((b%mod)*(c%mod))%mod.
Input Format:

The first line of input contains T , the number of test cases. 
Each test case consists of one line containing a single integer n.

Constraints:
1. 1<=T<=10
2. 1<=n<=10^16

Output Format

For each test case, print the required answer in a line.

Sample input:
2
2
1

Sample output:
4
1

Time Limit: 1
Memory Limit: 256
Source Limit:
Contributers:
Editor Image

?