OFFSET
1,1
COMMENTS
Can be generated quickly by modified sieve of Eratosthenes. Note that eliminating numbers that equal zero mod any previous number is exactly the sieve of Eratosthenes and generates the primes; eliminating numbers that equal one mod any previous number just gives the even numbers.
Bill McEachen has observed that, except for 5, this sequence contains the larger of every pair of twin primes (A006512). This is because the larger of a pair of twin primes could only be sieved out by the smaller twin in the same pair. But except for 3, the smaller twins are all 5 mod 6 and are sieved out by 3, so they are not present in the sequence and cannot sieve out the larger twins. - David Eppstein, Jul 20 2021
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Nick MacKinnon, Quasi-primes and the Goldbach conjecture, Math. Gaz., 72 (1988), 103-108.
EXAMPLE
a(4) = 13 because the smaller numbers after a(3) = 7 are eliminated: 8 == 2 (mod 2 or 3), 9 == 2 (mod 7), 10 == 2 (mod 2), 11 == 2 (mod 3), 12 == 2 (mod 2).
PROG
(Python)
def A076974():
D = {}
q = 2
while True:
if q not in D:
yield q
D.setdefault(q+2, []).append(q)
else:
for p in D[q]:
D.setdefault(p+q, []).append(p)
del D[q]
q += 1
a = A076974(); print([next(a) for _ in range(100)])
(Haskell)
a076974 n = a076974_list !! (n-1)
a076974_list = 2 : s [3, 5 ..] where
s (x:xs) = x : s [z | z <- xs, mod z x /= 2]
-- Reinhard Zumkeller, Feb 28 2014
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
David Eppstein, Nov 28 2002
EXTENSIONS
Offset changed by Reinhard Zumkeller, Feb 28 2014
STATUS
approved