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 A075321 #21 Feb 12 2018 10:24:52 %S A075321 3,7,13,23,37,17,53,43,61,83,109,73,101,139,41,149,157,137,113,193, %T A075321 197,179,211,229,263,199,227,107,331,293,311,283,241,269,349,359,383, %U A075321 367,401,317,379,439,491,421,409,449,463,467 %N A075321 Pair the odd primes so that the n-th pair is (p, p+2n) where p is the smallest prime not included earlier such that p and p+2n are primes and p+2n also does not occur earlier: (3, 5), (7, 11), (13, 19), (23, 31), (37, 47), (17, 29), (53, 67) ... This is the sequence of the first member of every pair. %C A075321 Question: Is every prime a member of some pair? %C A075321 If the distance between the prime pairs is not required to be 2n, we get A031215. - _R. J. Mathar_, Nov 26 2014 %C A075321 a(n) = A075323(2*n-1). %H A075321 Reinhard Zumkeller, <a href="/A075321/b075321.txt">Table of n, a(n) for n = 1..10000</a> %e A075321 a(4)=23: For the 4th pair though 17 is the smallest prime not occurring earlier, 17+8 = 25 is not a prime and 23 + 8 = 31 is a prime. %p A075321 A075321p := proc(n) %p A075321 option remember; %p A075321 local prevlist,i,p,q ; %p A075321 if n = 1 then %p A075321 return [3,5]; %p A075321 else %p A075321 prevlist := [seq(op(procname(i)),i=1..n-1)] ; %p A075321 for i from 2 do %p A075321 p := ithprime(i) ; %p A075321 if not p in prevlist then %p A075321 q := p+2*n ; %p A075321 if isprime(q) and not q in prevlist then %p A075321 return [p,q] ; %p A075321 end if; %p A075321 end if; %p A075321 end do: %p A075321 end if; %p A075321 end proc: %p A075321 A075321 := proc(n) %p A075321 op(1,A075321p(n)) ; %p A075321 end proc: %p A075321 seq(A075321(n),n=1..60) ; # _R. J. Mathar_, Nov 26 2014 %t A075321 A075321p[n_] := A075321p[n] = Module[{prevlist, i, p, q }, If[n == 1, Return[{3, 5}], prevlist = Array[A075321p, n-1] // Flatten]; For[i = 2, True, i++, p = Prime[i]; If[FreeQ[prevlist, p], q = p + 2*n ; If[ PrimeQ[q] && FreeQ[ prevlist, q], Return[{p, q}]]]]]; %t A075321 A075321 [n_] := A075321p[n][[1]]; %t A075321 Array[A075321, 50] (* _Jean-François Alcover_, Feb 12 2018, translated from _R. J. Mathar_'s program *) %o A075321 (Haskell) %o A075321 a075321 = a075323 . subtract 1 . (* 2) %o A075321 -- _Reinhard Zumkeller_, Nov 29 2014 %Y A075321 Cf. A075322, A075323. %K A075321 nonn %O A075321 1,1 %A A075321 _Amarnath Murthy_, Sep 14 2002 %E A075321 Corrected by _R. J. Mathar_, Nov 26 2014