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
CROSSREFS
KEYWORD
nonn
AUTHOR
Giorgos Kalogeropoulos, Oct 10 2025
STATUS
approved
