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 A235859 #14 Feb 05 2014 10:58:29 %S A235859 3,3,5,11,11,11,13,17,17,19,23,23,29,29,29,31,37,37,37,41,41,43,47,47, %T A235859 53,53,53,59,59,59,61,67,67,67,71,71,73,79,79,79,83,83,89,89,89,19,29, %U A235859 29,31,47,47,67,71,71,73,89,89,103,107,107,109,113,113 %N A235859 Define a(4)=3, then a(n+1) is the smallest prime P such that a(n) <= P < 2*n with 2*n-P=Q prime and, if not possible, a(n+1) is the smallest prime P such that P < a(n) < 2*n with 2*n-P=Q prime. %H A235859 Pierre CAMI, <a href="/A235859/b235859.txt">Table of n, a(n) for n = 4..10005</a> %e A235859 a(4)=3 as 2*4-3=5 prime by definition %e A235859 a(5)=3 as 2*5-3=7 prime, a(5)=a(4), a(5)<5 %e A235859 a(6)=5 as 2*6-5=7 prime, a(6)>a(5), a(6)<6 %e A235859 a(7)=5 not possible as 14-5=9 composite %e A235859 a(7)=7 not possible as 7=7 %e A235859 a(7)=11 as 2*7-11=3 prime %e A235859 ......................... %e A235859 a(48)=89 as 2*48-89=7 prime %e A235859 a(49)=89 not possible as 2*49-89=9 composite %e A235859 a(49)=97 not possible as 2*49-97=unity %e A235859 a(49)=19 as 19 is the smallest prime such that 2*49-19 is prime %e A235859 a(50)=29 as 29 is the smallest prime >=19 such that 2*50-29 is prime %o A235859 (PFGW & SCRIPT) %o A235859 SCRIPT %o A235859 DIM n,3 %o A235859 DIM i %o A235859 DIM pp %o A235859 DIMS t %o A235859 OPENFILEOUT myf,a(n).txt %o A235859 LABEL loop1 %o A235859 OPENFILEIN maf,prime.txt %o A235859 GETNEXT i,maf %o A235859 GETNEXT i,maf %o A235859 LABEL a %o A235859 SET n,n+1 %o A235859 IF n>10005 THEN END %o A235859 SET pp,2*n-i %o A235859 SETS t,%d,%d\,;n;i %o A235859 PRP pp,t %o A235859 IF ISPRP THEN GOTO c %o A235859 LABEL b %o A235859 GETNEXT i,maf %o A235859 IF i==n THEN GOTO b %o A235859 IF 2*n-i<3 THEN GOTO d %o A235859 SET pp,2*n-i %o A235859 SETS t,%d,%d\,;n;i %o A235859 PRP pp,t %o A235859 IF ISPRP THEN GOTO c %o A235859 GOTO b %o A235859 LABEL c %o A235859 WRITE myf,t %o A235859 GOTO a %o A235859 LABEL d %o A235859 CLOSEFILE maf %o A235859 SET n,n-1 %o A235859 GOTO loop1 %Y A235859 Cf. A002373, A020483, A235649. %K A235859 nonn,less %O A235859 4,1 %A A235859 _Pierre CAMI_, Jan 16 2014