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 A280941 #8 Jan 16 2017 14:07:34 %S A280941 2,3,10,0,33,45,0,294,98,0,296,262,0,428,984,0,1456,3086,0,2343,1878, %T A280941 0,14938,8422,0,2809,4259,0,7809,13819,0,51036,45506,0,15782,30764,0, %U A280941 57764,24553,0,23282,51942,0,44902,34214,0,1242641,95929,0,66761 %N A280941 Least integer k such that prime(k+1) - prime(k) = 2 and prime(k+2) - prime(k+1) = 2n, or 0 if no such k exists. %C A280941 Or least integer k such that prime(k+2) - prime(k+1) = 2n where prime(k) is in A001359 (lesser of twin primes). %C A280941 The corresponding prime(k) are 3, 5, 29, 137, 197, 1931, 521, 1949, 1667, 2969, 7757, 12161, 28349, 20807, ... %C A280941 a(n) is a subsequence of A029707(n) or subsequence of A107770(n) - 1. %C A280941 a(n) = 0 for n == 1 mod 3 for n > 1. %C A280941 Proof: prime(k+1) - prime(k) = 2 => prime(k+1) == 1 mod 6 and prime(k) == -1 mod 6. If prime(k+2) - prime(k+1) = 2n, then prime(k+2) = 2(n+1) + prime(k). Combining n == 1 mod 3 and prime(k) == -1 mod 6 we obtain prime(k+2) == 3 mod 6, a contradiction because prime(k+2) == +-1 mod 6. Hence, a(n) = 0. %e A280941 a(3) = 10 because prime(11) - prime(10) = 31 - 29 = 2 and prime(12) - prime(11) = 37 - 31 = 6 = 2*3. %e A280941 a(11) = 296 because prime(297) - prime(296) = 1951 - 1949 = 2 and prime(298) - prime(297) = 1973 - 1951 = 22 = 2*11. %p A280941 nn:=50:m:=10^5: %p A280941 for n from 1 to 50 do: %p A280941 ii:=0: %p A280941 for k from 1 to m while(ii=0) do: %p A280941 p1:=ithprime(k):p2:=ithprime(k+1):p3:=ithprime(k+2): %p A280941 if p2-p1 = 2 and p3-p2 = 2*n %p A280941 then %p A280941 ii:=1:printf(`%d %d \n`,n,k): %p A280941 else %p A280941 fi: %p A280941 od: %p A280941 if ii=0 then printf(`%d %d \n`,n,0): %p A280941 else %p A280941 fi: %p A280941 od: %t A280941 Table[If[And[n > 1, Mod[n, 3] == 1], 0, k = 1; While[Nand[# - Prime@ k == 2, Prime[k + 2] - # == 2 n] &@ Prime[k + 1], k++]; k], {n, 40}] (* _Michael De Vlieger_, Jan 14 2017 *) %Y A280941 Cf. A000040, A001359, A006512, A029707, A107770. %K A280941 nonn %O A280941 1,1 %A A280941 _Michel Lagneau_, Jan 11 2017