|
|
A211204
|
|
a(1) = 2; for n > 1, a(n) > a(n-1) is the smallest prime for which the set {a(1), a(2), ..., a(n)} lacks at least one residue modulo every odd prime less than or equal to a(n).
|
|
2
|
|
|
2, 3, 5, 11, 17, 23, 41, 47, 53, 71, 83, 101, 107, 113, 131, 137, 167, 173, 191, 197, 233, 251, 257, 263, 311, 317, 347, 353, 401, 431, 443, 461, 467, 503, 521, 563, 593, 641, 647, 653, 677, 683, 701, 743, 761, 773, 797, 827, 857, 863, 881, 911, 941, 947, 971
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
By construction, for every odd prime p > 1, the sequence does not contain a full residue system modulo p. For n >= 4, all differences a(n) - a(n-1) are multiples of 6; otherwise said, a(n) == 5 (mod 6).
Conjecture: The sequence contains infinitely many "twins" with a(n)-a(n-1) = 6.
All terms greater than 3 are 2 mod 3, so the sequence does not contain a complete residue system mod 3; all terms are not 4 mod 5, so the sequence does not contain a complete residue system mod 5; since 7 is absent in the sequence, there is not a complete residue system mod 7.
By the Chinese remainder theorem and Dirichlet's theorem on arithmetic progressions, the sequence is infinite. - Dimiter Skordev, Apr 05 2022
|
|
LINKS
|
|
|
PROG
|
(Python)
def isPrime(n):
if (n%2==0): return n==2
for i in range(3, int(n**0.5+1), 2):
if (n%i==0): return False
return n>1
def nextPrime(n):
n=n+1
while not isPrime(n): n=n+1
return n
def a(n):
p, L, S=2, [], []
while len(L)<n-1:
p, S1, i=nextPrime(p), S, 0
while (i<len(L)) and ((len(S[i])+2<L[i]) or (p%L[i] in S[i])):
S1[i].add(p%L[i])
i=i+1
if i==len(L):
S1.append(set(L))
S=S1
L.append(p)
return p
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|