The two words in the name of ROSE-INNES are squares,while OR is a prime number.
What are these numbers?
ROSE-INNES is 9216 53361
(If the hyphen is subtraction, which is likely not the intent, the result is -44145)
--------------
squares4 = [n**2 for n in range(10000) if len(str(n**2)) == 4]
squares5 = [n**2 for n in range(100000) if len(str(n**2)) == 5]
primes2 = [i for i in range(11,101,2) if isprime(i)]
ROSE_candidates = []
for s in squares4:
st = str(s)
d12 = int(st[:2][::-1])
if d12 in primes2:
# print(s)
ROSE_candidates.append(s)
for rose in ROSE_candidates:
strRose = str(rose)
if len(strRose) != len(set(strRose)):
continue
ES = strRose[::-1][:2]
for s5 in squares5:
ss5 = str(s5)
if ss5[1] != ss5[2]:
continue
if str(s5)[3:] == ES:
print('ROSE-INNES is', rose, s5)
|
Posted by Larry
on 2024-01-21 07:24:07 |