%I #48 Jun 02 2022 10:31:14
%S 2,3,5,11,17,23,41,47,53,71,83,101,107,113,131,137,167,173,191,197,
%T 233,251,257,263,311,317,347,353,401,431,443,461,467,503,521,563,593,
%U 641,647,653,677,683,701,743,761,773,797,827,857,863,881,911,941,947,971
%N 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).
%C 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).
%C Conjecture: The sequence contains infinitely many "twins" with a(n)-a(n-1) = 6.
%C 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.
%C By the Chinese remainder theorem and Dirichlet's theorem on arithmetic progressions, the sequence is infinite. - _Dimiter Skordev_, Apr 05 2022
%H Dimiter Skordev, <a href="/A211204/b211204.txt">Table of n, a(n) for n = 1..1000</a> (first 92 terms from Vladimir Shevelev and Peter J. C. Moses)
%o (Python)
%o def isPrime(n):
%o if (n%2==0): return n==2
%o for i in range(3,int(n**0.5+1),2):
%o if (n%i==0): return False
%o return n>1
%o def nextPrime(n):
%o n=n+1
%o while not isPrime(n): n=n+1
%o return n
%o def a(n):
%o p,L,S=2,[],[]
%o while len(L)<n-1:
%o p,S1,i=nextPrime(p),S,0
%o while (i<len(L)) and ((len(S[i])+2<L[i]) or (p%L[i] in S[i])):
%o S1[i].add(p%L[i])
%o i=i+1
%o if i==len(L):
%o S1.append(set(L))
%o S=S1
%o L.append(p)
%o return p
%o # _Dimiter Skordev_, Apr 05 2022
%Y Cf. A210537.
%K nonn
%O 1,1
%A _Vladimir Shevelev_ and _Peter J. C. Moses_, Feb 04 2013
%E Edited by _M. F. Hasler_, Feb 13 2013
|