login
A109307
Numbers m such that m^2 + (m+/-1)^2 are both semiprimes.
0
11, 16, 27, 38, 44, 45, 52, 55, 56, 57, 63, 64, 68, 74, 75, 76, 77, 81, 112, 113, 114, 124, 134, 141, 142, 143, 148, 151, 152, 170, 180, 181, 182, 183, 184, 191, 192, 209, 214, 215, 216, 227, 240, 251, 252, 255, 256, 263, 266, 269, 270, 274, 275, 293, 294, 295
OFFSET
1,1
EXAMPLE
38 is a term because 38^2 + 37^2 = 2813 = 29*97 (semiprime) and 38^2 + 39^2 = 2965 = 5*593 (semiprime).
MATHEMATICA
Select[Range[2, 400], Plus@@Last/@FactorInteger[ #^2+(#+1)^2]==Plus@@Last/@FactorInteger[ #^2+(#-1)^2]==2&]
PROG
(Python)
from sympy import factorint
def issemiprime(n): return sum(factorint(n).values()) == 2
def ok(n): return all(issemiprime(n**2 + (n+k)**2) for k in [1, -1])
print([k for k in range(296) if ok(k)]) # Michael S. Branicky, Nov 16 2021
CROSSREFS
Sequence in context: A371187 A110031 A166451 * A327752 A128835 A316171
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 25 2005
EXTENSIONS
Title corrected by Michael S. Branicky, Nov 16 2021
STATUS
approved