cp's OEIS Frontend

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.

A317597 a(n) is the smallest even number for which there are n prime numbers between a(n) and the largest prime number p such that a(n)-p is also a prime.

This page as a plain text file.
%I A317597 #9 Sep 15 2018 15:52:56
%S A317597 10,4,128,98,308,488,1118,3818,1928,2438,992,2642,5372,7426,9596,
%T A317597 64838,54244,48002,22832,100768,103738,63274,194470,194428,128168,
%U A317597 180596,986332,850712,1403372,880508,3619208,5960648,503222,4454768,2209532,3526958,4445372
%N A317597 a(n) is the smallest even number for which there are n prime numbers between a(n) and the largest prime number p such that a(n)-p is also a prime.
%e A317597 For n=0, 10 = 7 + 3 is the smallest even number such that there is no prime between 7 and 10, so a(0)=10;
%e A317597 for n=1, 4 = 2 + 2 is the smallest even number such that there is only one prime between 2 and 4, which is 3, so a(1)=4;
%e A317597 for n=2, 128 = 109 + 19, there are two primes between 109 and 128, which are 113 and 127, for which a(n)-p = 15 and 1 respectively, and both nonprime.  There is no smaller even number having exactly 2 such primes, so a(2)=128.
%t A317597 fa = {}; n = 2; efa = 0; While[efa < 37, n = n + 2; p = NextPrime[n];
%t A317597 ct = 0; While[p = NextPrime[p, -1]; ! PrimeQ[n - p], ct++];
%t A317597 While[ct > (Length[fa] - 2), AppendTo[fa, 0]];
%t A317597 If[fa[[ct + 1]] == 0, fa[[ct + 1]] = n];
%t A317597 While[fa[[efa + 1]] > 0, efa++]];Part[fa,1;;efa]
%Y A317597 Cf. A317595.
%K A317597 nonn
%O A317597 0,1
%A A317597 _Lei Zhou_, Aug 01 2018