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 A157478 #10 Feb 05 2020 17:56:37 %S A157478 5,11,17,37,53,89,107,127,179,197,223,233,257,263,401,409,421,449,457, %T A157478 661 %N A157478 a(n) is the least prime p such that p is greater than any previous term and is representable as the arithmetic mean of two other primes in exactly n different ways. %C A157478 A number p is representable as the arithmetic mean of two other primes in n ways if there are n values of k such that p + k and p - k are both prime. %C A157478 If the restriction that a(n) must be greater than previous terms is removed then the sequence would be A126204. - _Andrew Howroyd_, Jan 12 2020 %C A157478 The next term if it exists > 10^6. - _Andrew Howroyd_, Jan 12 2020 %e A157478 a(1) = 5 because 5+-2 are primes. %e A157478 a(2) = 11 because 11+-6, 11+-8 are primes. %e A157478 a(3) = 17 because 17+-6, 17+-12, 17+=14 are primes. %e A157478 a(4) = 37 because 37+-6, 37+-24, 37+-30, 37+-34 are primes. %e A157478 a(5) = 53 because 53+-6, 53+-30, 53+-36, 53+-48, 53+-50 are primes. %t A157478 q=1;lst={};Do[p=Prime[n];i=0;Do[If[PrimeQ[p-k]&&PrimeQ[p+k],i++;],{k,2,p,2}];If[i==q,AppendTo[lst,p];q++ ],{n,2*5!}];lst %o A157478 (PARI) a(n, lim=oo)={my(v=vector(n),r=1); forprime(p=5, lim, my(k=0); forprime(q=3, p-2, k+=isprime(2*p-q)); if(k==r, if(r==n, return(p)); r++))} \\ _Andrew Howroyd_, Jan 12 2020 %Y A157478 Cf. A126204. %K A157478 nonn,more %O A157478 1,1 %A A157478 _Vladimir Joseph Stephan Orlovsky_, Mar 01 2009 %E A157478 Definition clarified by _Andrew Howroyd_, Jan 12 2020