This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A305558 #19 Jul 03 2018 11:27:20 %S A305558 1,2,0,0,0,0,0,2,0,0,4,-4,4,-6,8,0,4,0,6,0,-6,0,-4,0,6,0,0,8,-6,6,-2, %T A305558 -6,6,0,0,4,-4,0,-4,0,-12,0,-14,0,0,-6,0,2,-6,0,-2,0,20,6,-2,8,0,6,-2, %U A305558 6,0,0,-8,6,4,-10,6,-12,-12,10,0,2,0,4,-6,0,2,0,-6,12,22,-18,6,8,-18,8,-22,6,-2,6,0,0,18,-6 %N A305558 If (p1,p2) is the n-th twin prime pair and p the prime before p1 and q the prime after p2 then a(n) = p + q - (p1 + p2). %F A305558 a(n) = A000040(A029707(n)-1) + A000040(A107770(n)+1) - (A001359(n) + A006512(n)). - _Jianing Song_, Jun 22 2018 %e A305558 For n = 8, the 8th prime pair is (71, 73), the prime before 71 is 67 and prime after 73 is 79. So a(8) = 67 + 79 - 71 - 73 = 2. %t A305558 Map[#1 + #4 - (#2 + #3) & @@ # &, Select[Partition[Prime@ Range[500], 4, 1], And[#3 - #2 == 2] & @@ # &]] (* _Michael De Vlieger_, Jun 30 2018 *) %o A305558 (PARI) { %o A305558 print1(2+7-(5+3)", "); %o A305558 forstep(n=6,100,6, %o A305558 if(isprime(n-1)&&isprime(n+1), %o A305558 a=precprime(n-2);b=nextprime(n+2); %o A305558 print1(a+b-2*n", ") %o A305558 ) %o A305558 ) %o A305558 } %Y A305558 Cf. A001097, A054735, A036263. %K A305558 sign,easy %O A305558 1,2 %A A305558 _Dimitris Valianatos_, Jun 21 2018 %E A305558 Definition clarified by _Jianing Song_, Jun 22 2018