login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A109307 Numbers m such that m^2 + (m+/-1)^2 are both semiprimes. 0

%I #10 Nov 16 2021 07:34:57

%S 11,16,27,38,44,45,52,55,56,57,63,64,68,74,75,76,77,81,112,113,114,

%T 124,134,141,142,143,148,151,152,170,180,181,182,183,184,191,192,209,

%U 214,215,216,227,240,251,252,255,256,263,266,269,270,274,275,293,294,295

%N Numbers m such that m^2 + (m+/-1)^2 are both semiprimes.

%e 38 is a term because 38^2 + 37^2 = 2813 = 29*97 (semiprime) and 38^2 + 39^2 = 2965 = 5*593 (semiprime).

%t Select[Range[2, 400], Plus@@Last/@FactorInteger[ #^2+(#+1)^2]==Plus@@Last/@FactorInteger[ #^2+(#-1)^2]==2&]

%o (Python)

%o from sympy import factorint

%o def issemiprime(n): return sum(factorint(n).values()) == 2

%o def ok(n): return all(issemiprime(n**2 + (n+k)**2) for k in [1, -1])

%o print([k for k in range(296) if ok(k)]) # _Michael S. Branicky_, Nov 16 2021

%K nonn

%O 1,1

%A _Zak Seidov_, Jun 25 2005

%E Title corrected by _Michael S. Branicky_, Nov 16 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 23 09:01 EDT 2024. Contains 374547 sequences. (Running on oeis4.)