cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

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