OFFSET
1,1
COMMENTS
All terms in this sequence are composites since, if m is a prime, d = 0 and (m-d)*(m+d) = m^2 > (m-1)^2.
It seems that the number of terms in this sequence is finite, with the last term being a(1225) = 1353559. Conjecture: there exist only 1225 semiprimes of the form (m-d)*(m+d), where d is the smallest number such that (m-d)*(m+d) < (m-1)^2.
a(n) in this sequence is the value of n in A047160 with m > sqrt(2*n - 1).
All terms <= 1353559 in A335297 can be found in this sequence.
EXAMPLE
2 is not a term since for m = 2, d = 0 and (2-0)*(2-0) = 4 > (m-1)^2 = 1;
4 is not a term since for m = 4, d = 1 and (4-1)*(4+1) = 15 > (m-1)^2 = 9;
22 is a term since for m = 22, d = 9 and (22-9)*(22+9) = 403 < (m-1)^2 = 441;
1353559 is a term since for m = 1353559, d = 1722 and (1353559-1722)*(1353559+1722) = 1832119001197 < (m-1)^2 = 1832119259364.
PROG
(Python)
from sympy import isprime
n = 0
m = 2
while m >= 2:
d = 0
while d < m/2:
p = m - d
q = m + d
if isprime(p) == 1 and isprime(q) == 1:
if p*q < (m - 1) * (m - 1):
n += 1
print (m)
break
d += 1
m += 1
CROSSREFS
KEYWORD
nonn
AUTHOR
Ya-Ping Lu, Oct 04 2020
STATUS
approved