OFFSET
1,2
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..232
Richard K. Guy, What are the smallest arithmetic progressions of composite numbers?, Amer. Math. Monthly, Vol. 93, No. 8 (1986), p. 627.
PROG
(Python)
from math import gcd
from sympy import isprime
from itertools import count, islice, takewhile
def comp(n): return not isprime(n)
def agen(): # generator of terms
n = 1
for m in count(2):
for k in range(1, m):
if gcd(k, m) != 1:
continue
ap = len(list(takewhile(comp, (i*m+k for i in count(1)))))
if ap >= n:
for i in range(n, ap+1):
yield k
n = ap + 1
print(list(islice(agen(), 64))) # Michael S. Branicky, Mar 12 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Mar 12 2022
EXTENSIONS
a(24) and beyond from Michael S. Branicky, Mar 12 2022.
STATUS
approved