|
|
A352185
|
|
a(n) = smallest integer m for which there is an integer k, with 0 < k < m and gcd(k,m)=1, such that the arithmetic progression m+k, 2*m+k, ..., n*m+k contains only composite numbers.
|
|
3
|
|
|
3, 5, 7, 11, 11, 13, 19, 19, 19, 31, 31, 31, 31, 31, 31, 31, 31, 47, 47, 61, 61, 61, 61, 127, 127, 127, 127, 127, 139, 139, 139, 139, 139, 193, 193, 229, 229, 229, 229, 283, 283, 283, 283, 283, 283, 337, 337, 337, 337, 337, 409, 409, 409, 409, 409, 409, 409, 461
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Richard Guy reports that the sequence originated with Victor Pambuccian, who asks, among other things, if a(n) is always prime. [The answer is no - read on. - N. J. A. Sloane, Mar 13 2022]
For the corresponding values of k see A352186.
a(135) = 8207 is the first nonprime term and there are many other counterexamples to the conjecture: a(150..173) = 12311, a(193..195) = 40247, a(196..202) = 40951, ... . - Michael S. Branicky, Mar 13 2022
|
|
LINKS
|
|
|
FORMULA
|
|
|
EXAMPLE
|
For n=1, m=3, k=1, the AP is [4].
For n=4, m=11, k=5, the AP is [16, 27, 38, 49].
|
|
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 m
n = ap + 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|