login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Where the prime race among 8k+1, ..., 8k+7 changes leader.
9

%I #18 Nov 21 2024 18:08:08

%S 2,11,37,83,197,227,271,293,347,373,487,547,853,907,1069,1447,1733,

%T 1831,1949,2027,2053,2131,2237,2251,2309,2719,2749,3019,3061,3083,

%U 3733,3779,3877,3931,4919,5179,5303,5347,5407,6661,6911,6949,6967,7459,7789

%N Where the prime race among 8k+1, ..., 8k+7 changes leader.

%H Robert Israel, <a href="/A297406/b297406.txt">Table of n, a(n) for n = 1..10000</a>

%H Robert G. Wilson v, <a href="/A005596/a005596.pdf">Letter to N. J. A. Sloane, Aug. 1993</a>

%p X:= Vector(4): X[2]:= 1: m:= 3: p:= 3: count:= 1: R:= 2:

%p for i from 2 while count < 100 do

%p p:= nextprime(p);

%p j:= ((p mod 8)+1)/2;

%p X[j]:= X[j]+1;

%p mp:= max[index](X);

%p if mp <> m and X[mp] > X[m] then

%p m:= mp;

%p R:= R,p;

%p count:= count+1;

%p fi

%p od:

%p R; # _Robert Israel_, Nov 21 2024

%Y Cf. A007352, A007350, A007353, A007354, A297406, A297407, A297408, A297410, A297411.

%K nonn,look

%O 1,1

%A _Sean A. Irvine_, Dec 29 2017