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 A126938 #13 Feb 27 2017 01:14:43 %S A126938 3,7,19,43,79,127,151,163,199,223,331,367,379,439,487,607,619,643,739, %T A126938 883,991,1051,1087,1171,1231,1327,1471,1627,1699,1747,1759,1987,1999, %U A126938 2179,2383,2551,2683,2731,2767,3067,3259,3343,3571,3643,3739,3847,3907 %N A126938 a(1) = 3, a(n) = the smallest prime p > a(n-1) such that (a(n-1)+p)/2 is prime. %C A126938 Starting with a(2)=7 all terms are 7 mod 12. - _Zak Seidov_, Feb 26 2017 %H A126938 Zak Seidov, <a href="/A126938/b126938.txt">Table of n, a(n) for n = 1..1000</a> %e A126938 (3+7)/2=5 prime, (7+19)/2=13 prime, (19+43)/2=31 prime, etc. %p A126938 A[1]:= 3: A[2]:= 7: %p A126938 for n from 3 to 100 do A[n]:= f(A[n-1]) od: %p A126938 seq(A[i],i=1..100); # _Robert Israel_, Feb 27 2017 %t A126938 s={3};pn=3;n=PrimePi[pn];Do[Do[p=Prime[i];If[PrimeQ[(pn+p)/2],AppendTo[s,p];pn=p;n=i;Break[]],{i,n+1,10000}],{112}];s %t A126938 sp[n_]:=Module[{p=NextPrime[n]},While[!PrimeQ[(n+p)/2],p=NextPrime[p]];p]; NestList[sp,3,50] (* _Harvey P. Dale_, Apr 12 2013 *) %o A126938 (PARI) step(q)=forprime(p=q+1,, if(isprime((p+q)/2), return(p))) %o A126938 first(n)=my(v=vector(n)); v[1]=3; for(k=2,n, v[k]=step(v[k-1])); v \\ _Charles R Greathouse IV_, Feb 27 2017 %Y A126938 Cf. A084704, A128653, A128654, A128655. %K A126938 nonn %O A126938 1,1 %A A126938 _Zak Seidov_, Mar 18 2007