|
|
A086169
|
|
Sum of the first n twin prime pairs.
|
|
3
|
|
|
8, 20, 44, 80, 140, 224, 344, 488, 692, 908, 1184, 1484, 1844, 2228, 2624, 3080, 3560, 4100, 4664, 5288, 5984, 6824, 7688, 8612, 9656, 10796, 11996, 13232, 14516, 15836, 17456, 19100, 20756, 22472, 24236, 26276, 28340, 30440, 32564, 34748, 37052
(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+5+7+11+13+17+19 = 80
|
|
MATHEMATICA
|
Accumulate[Total/@Select[Partition[Prime[Range[300]], 2, 1], #[[2]]-#[[1]] == 2&]] (* Harvey P. Dale, Nov 09 2019 *)
|
|
PROG
|
(PARI) addnexttwin(n)= { s=0; for(x=1, n, if(prime(x+1)-prime(x)==2, s=s+prime(x+1)+prime(x); print1(s", ")) ) }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|