- All Contests
- ProjectEuler+
- Project Euler #133: Repunit nonfactors

# Project Euler #133: Repunit nonfactors

# Project Euler #133: Repunit nonfactors

_{This problem is a programming version of Problem 133 from projecteuler.net}

A number consisting entirely of ones is called a repunit. We shall define to be a repunit of length ; for example, .

Let us consider repunits of the form .

Although , , or are not divisible by , is divisible by . Yet there is no value of for which will divide by . In fact, it is remarkable that , , , and are the only four primes below one-hundred that can be a factor of .

Given , find the sum of all the primes below that will never be a factor of .

**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**

In all but the last two test files:

In the second-to-last test file:

In the last test file:

**Output Format**

For each test case, output a single line containing a single integer, the answer for that test case.

**Sample Input**

```
1
100
```

**Sample Output**

```
918
```