top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

    Get Free Puzzle Updates

Facebook Login
Site Registration

What will be the best approach to finding all the prime numbers less than 75 that leave an odd reminder ............

+1 vote
119 views

What will be the best approach to finding all the prime numbers less than 75 that leave an odd reminder when we divide them with 5?

posted Oct 5, 2016 by Madhavi Latha

Share this puzzle
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+2 votes
 
Best answer

Numbers that leave an odd reminder when we divide them with 5 means, they will be in the form of
(5x+1) or (5x+3)
This will be the best way to start with, and then you can add constraints like the number should be less than 75 or the number should be prime.

answer Oct 5, 2016 by Smriti
0 votes

Except 2 and 3, all the prime numbers are in a form of (6k +1) or (6k -1)
Therefore, you can use the formula to write down the prime numbers as:
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 61, 67, 71, 73

Now, you can separate numbers as per the requirement that are:
3, 11, 13, 23, 31, 41, 43, 53, 61, 71 and 73

answer Jan 21 by Samardeep Acharya



Similar Puzzles
+1 vote

Find the sum of all the prime numbers larger than 2 less than 10^12 that are 1 more than a perfect square. Because the number can get pretty big provide the answer mod 1007.

Note: Problem shouldn't take much more than one minute if your answer is taking too long consider looking for optimizations.

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...