Solution: For positive integer n let the sum of the first 2n primes be defined byagentredlum said:Please allow me to post a question.

Q. Find a relation between primes that generates the first 31 numbers in the following integer sequence

1 1 1 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 ...

Bonus Question: Why is this sequence not in OEIS?

If no one gets it in 24 hours i will post the answer unless someone asks for more time or asks for a hint.

\(\displaystyle f(2n) \ = \ 1 \ \ \text{iff} \ \ f(2n) \text{ is \ prime}\)

\(\displaystyle f(2n) \ = \ 0 \ \ \text{iff} \ \ f(2n) \text{ is \ composite}\)

Examples:

n = 1

\(\displaystyle f(2) \ = \ 2 \ + \ 3 \ = \ 5 \ = \ \text{prime} \ = \ 1\)

n = 2

\(\displaystyle f(4) \ = \ 2 \ + \ 3 \ + \ 5 \ + \ 7 \ = \ 17 \ = \ \text{prime} \ = \ 1\)

n = 3

\(\displaystyle f(6) \ = \ 17 \ + \ 11 \ + \ 13 \ = \ 41 \ = \ \text{prime} \ = \ 1\)

n = 4

\(\displaystyle f(8) \ = \ 41 \ + \ 17 \ + \ 19 \ = \ 77 \ = \ \text{composite} \ = \ 0\)

For integer n from 1 to 4 , we have thus generated the first 4 terms of the sequence ,

1 1 1 0

continue in like fashion to generate as many terms as you wish.

Bonus Question: There are related sequences at OEIS , for example ,

http://oeis.org/A013918

But none that use my scheme for 2n that i could find.

Justification for the use of 2n: It is obvious that if we sum an odd number of consecutive primes , beginning with the first prime 2 , the sum cannot be prime so it is natural to ignore those sums , hence we sum primes with an even number of terms 2n.