login
A389680
Numbers k for which no i > 1 exists such that k + i is composite and its least prime factor exceeds i^2.
0
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 61, 62, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73
OFFSET
1,2
COMMENTS
The density of this sequence decreases with n.
It is conjectured that this sequence is finite (see Erdős Problems link).
Search for i can stop once i^4 < k+i. This is because for the least prime factor lpf(k+i) we have: lpf(k+i)>i^2 and lpf(k+i) <= sqrt(k+i). So, i^2 < sqrt(k+i) and i^4 < k+i.
LINKS
Thomas Bloom, Problem 681, Erdős Problems.
EXAMPLE
Number 23 is not in the sequence because there exist i > 1, i = 2 such that the least prime factor of 23 + 2 which is 5 is greater than i^2 = 4.
MATHEMATICA
f[n_]:=(i=2; While[i^4<n+i, m=n+i; If[!PrimeQ@m, If[First@First@FactorInteger@m>i^2, Return@i]]; i++]; 0); Select[Range@100, f@#==0&]
PROG
(Python)
from itertools import count, islice
from sympy import isprime, primefactors
def A389680_gen(startvalue=1): # generator of terms >= startvalue
for k in count(max(startvalue, 1)):
i, j = 2, 4
while j**2<k+i:
if not isprime(m:=k+i) and min(primefactors(m))>j:
break
i += 1
j += (i<<1)-1
else:
yield k
A389680_list = list(islice(A389680_gen(), 68)) # Chai Wah Wu, Oct 21 2025
CROSSREFS
Sequence in context: A214922 A004830 A081330 * A359415 A080682 A182049
KEYWORD
nonn
AUTHOR
STATUS
approved