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

Home > Just Math
Prime Symphony (Posted on 2024-07-01) Difficulty: 3 of 5
Determine all pairs of prime numbers p and q less than 100, such that the following five numbers:

p+6, p+10, q+4, q+10, p+q+1

are all prime numbers.

No Solution Yet Submitted by Danish Ahmed Khan    
Rating: 4.0000 (1 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution computer solution | Comment 2 of 5 |
pr=primes(100);
for pno=1:length(pr)
  for qno=1:length(pr)
    p=pr(pno);
    q=pr(qno);
    if isprime(p+6) && isprime(p+10)
      if isprime(q+4) && isprime(q+10)
        if isprime(p+q+1)
          disp([p q])
        end
      end
    end
  end
end

     p     q
     7     3
    13     3
    37     3
    97     3
    
A brute force program can be more objective, avoiding the assumption that all numbers involved need be under 100--only p and q themselves need to be.    

  Posted by Charlie on 2024-07-01 13:47:53
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (0)
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