We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.

Loading...

- Practice
- Mathematics
- Fundamentals
- Summing the N series

# Summing the N series

# Summing the N series

You are given a sequence whose term is

You have to evaluate the series

Find .

**Input Format**

The first line of input contains , the number of test cases.

Each test case consists of one line containing a single integer .

**Constraints**

**Output Format**

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

**Sample Input 0**

```
2
2
1
```

**Sample Output 0**

```
4
1
```

**Explanation 0**

Case 1: We have

Case 2: We have