OFFSET
1,1
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
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
Cino Hilliard, Aug 25 2003
STATUS
approved