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”).

A341640
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
2, 3, 5, 7, 13, 19, 61, 211, 151, 181, 199, 113, 1069, 1129, 773, 3137, 887, 13187, 14087, 5351, 29881, 2477, 30727, 69263, 40289, 35677, 118973, 110359, 31397, 186481, 294563, 155921, 404851, 221327, 332317, 265621, 1665343, 544279, 1349533, 2124679, 1242643, 3826019, 7230331, 1444309, 5831401
OFFSET
0,1
COMMENTS
a(n) >= A341650(n), with equality if and only if A341650(n) < A341650(n+1).
LINKS
EXAMPLE
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.
MAPLE
N:= 50: # for a(0) to a(N)
count:= 1:
P:= [seq(ithprime(i), i=1..N)]:
V:= Array(0..N): V[0]:= 2: q:= 3:
while count < N+1 do
p:= q; q:= nextprime(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;
r:= r-1;
if r <= N and V[r] = 0 then V[r]:= p; count:= count+1; fi;
od:
convert(V, list);
CROSSREFS
Cf. A341650.
Sequence in context: A146999 A147485 A341650 * A104189 A301776 A178570
KEYWORD
nonn
AUTHOR
J. M. Bergot and Robert Israel, Feb 18 2021
STATUS
approved