login
a(n) is the first prime p such that each of the first n primes divides at least one of the composites between p and the next prime, but prime(n+1) does not divide any of these.
1

%I #30 Jul 15 2021 21:27:16

%S 2,3,5,7,13,19,61,211,151,181,199,113,1069,1129,773,3137,887,13187,

%T 14087,5351,29881,2477,30727,69263,40289,35677,118973,110359,31397,

%U 186481,294563,155921,404851,221327,332317,265621,1665343,544279,1349533,2124679,1242643,3826019,7230331,1444309,5831401

%N a(n) is the first prime p such that each of the first n primes divides at least one of the composites between p and the next prime, but prime(n+1) does not divide any of these.

%C a(n) >= A341650(n), with equality if and only if A341650(n) < A341650(n+1).

%H Robert Israel, <a href="/A341640/b341640.txt">Table of n, a(n) for n = 0..78</a>

%e a(7) = 211 because each of the first 7 primes divides at least one of the composites 212 to 222 (2|212, 3|213, 5|215, 7|217, 11|220, 13|221, 17|221), but the 8th prime 19 does not.

%p N:= 50: # for a(0) to a(N)

%p count:= 1:

%p P:= [seq(ithprime(i),i=1..N)]:

%p V:= Array(0..N): V[0]:= 2: q:= 3:

%p while count < N+1 do

%p p:= q; q:= nextprime(p);

%p for r from 1 to N do x:= -p mod P[r]; if subs(0=P[r],x) >= q-p then break fi od;

%p r:= r-1;

%p if r <= N and V[r] = 0 then V[r]:= p; count:= count+1; fi;

%p od:

%p convert(V,list);

%Y Cf. A341650.

%K nonn

%O 0,1

%A _J. M. Bergot_ and _Robert Israel_, Feb 18 2021