A336585 Integers m such that (m-d)*(m+d) < (m-1)^2, where d is the smallest number such that both m-d and m+d are primes.
22, 28, 32, 38, 46, 49, 55, 58, 68, 74, 82, 87, 94, 112, 121, 128, 130, 136, 146, 155, 184, 200, 203, 206, 218, 221, 224, 238, 244, 247, 253, 265, 268, 284, 286, 301, 304, 306, 308, 316, 318, 320, 323, 326, 341, 344, 346, 362, 398, 412, 413, 428, 454, 466, 484
Offset: 1
Keywords
Examples
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.
Programs
-
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
Comments