OFFSET
1,5
COMMENTS
a(n) is the number of primes that are not twin primes greater than the first twin prime pair (3,5) and less than the (n+1)th twin prime pair. All primes, other than two either exist in one of the twin prime pairs or are counted in the sum. Two is not included because it occurs before the first twin prime pair.
LINKS
Jens Kruse Andersen, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=4, a(4)=1. We can get this by writing the first n+1 twin prime pairs and taking the sum of the primes in between them. The pairs are (3,5),(5,7),(11,13),(17,19),(29,31). The only prime between these pairs is 23, thus the answer is one.
PROG
(PARI) s=0; forprime(p=5, 10^4, if(isprime(p+2), print1(s", "); s--, s++)) \\ Jens Kruse Andersen, Aug 17 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Sam Mathers, Aug 16 2014
STATUS
approved