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
Dimiter Skordev, Table of n, a(n) for n = 1..1000 (first 92 terms from Vladimir Shevelev and Peter J. C. Moses)
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
# Dimiter Skordev, Apr 05 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Vladimir Shevelev and Peter J. C. Moses, Feb 04 2013
EXTENSIONS
Edited by M. F. Hasler, Feb 13 2013
STATUS
approved