A078731 Sum of primes between successive pairs of twin primes.
0, 0, 0, 23, 37, 100, 67, 348, 0, 371, 0, 660, 0, 0, 434, 233, 771, 277, 600, 985, 3810, 0, 1788, 3435, 2208, 1757, 1220, 631, 1300, 13190, 0, 0, 1692, 1740, 16239, 0, 1039, 0, 2156, 6678, 10749, 3745, 1283, 1297, 1307, 11040, 4319, 2930, 0, 23259, 1613, 6584
Offset: 1
Keywords
Examples
Between the 8th and 9th pairs of twin primes are 4 primes: (71,73) 79 83 89 97 (101,103), therefore a(8) = 79+83+89+97 = 348.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
seq[lim_] := Module[{p = Prime[Range[lim]], d, i}, d = Differences[p]; i = Position[d, 2] // Flatten; If[First[#] + 2 >= Last[#], 0, Total[p[[First[#] + 2 ;; Last[#] - 1]]]] & /@ Partition[i, 2, 1]]; seq[300] (* Amiram Eldar, Apr 06 2025 *)