|
|
A086167
|
|
a(n) = sum of the first n lower twin primes.
|
|
4
|
|
|
3, 8, 19, 36, 65, 106, 165, 236, 337, 444, 581, 730, 909, 1100, 1297, 1524, 1763, 2032, 2313, 2624, 2971, 3390, 3821, 4282, 4803, 5372, 5971, 6588, 7229, 7888, 8697, 9518, 10345, 11202, 12083, 13102, 14133, 15182, 16243, 17334, 18485
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
For n = 4 we have twin prime pairs (3,5) (5,7) (11,13) (17,19) and 3 + 5 + 11 + 17 = 36.
|
|
MATHEMATICA
|
Accumulate[Transpose[Select[Partition[Prime[Range[200]], 2, 1], #[[2]] - #[[1]] == 2 &]][[1]]] (* Harvey P. Dale, Feb 02 2011 *)
|
|
PROG
|
(PARI) addnexttwin(n)= { s=0; for(x=1, n, if(prime(x+1)-prime(x)==2, s=s+prime(x); print1(s", ")) ) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|