All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Numbers
Rose-Innes are Squares (Posted on 2024-01-21) Difficulty: 3 of 5
The two words in the name of ROSE-INNES are squares,while OR is a prime number.

What are these numbers?

See The Solution Submitted by K Sengupta    
Rating: 5.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Computer solution | Comment 1 of 2
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
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (1)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (15)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information