Skip to main content
20-Turquoise
November 1, 2010
Solved

Twin Primes and Extracting.

  • November 1, 2010
  • 64 replies
  • 31140 views

Hi,

I have a question and need help. Assuming that we have a set of Prime Numbers (from 5 to 37

in this case) Let's extract Twin Primes like as the Output below. (IN .MCD12)

P.PNGTwinPrimes.PNG

Thanks in advance.

Regards,

Loi.

Best answer by StuartBruff

Loi Le wrote:

Thanks, Richard. Possibly I should have the update-question :

P.PNG Twin_Non-Twin.PNG

Just a top-of-the-head thing, but might be worth playing with. Makes use of the fact that 'triple primes' don't exist (unless you count 1,2,3), to avoid re-testing numbers.

Stuart

64 replies

1-Visitor
November 2, 2010

Something like the attached?

Mike

19-Tanzanite
November 2, 2010

Sorry, but that's not correct. Twin primes are pairs of primes that differ by 2, so (23,29) is not a valid pair.

lvl10720-TurquoiseAuthor
20-Turquoise
November 2, 2010

Thanks, Richard. Possibly I should have the update-question :

P.PNG Twin_Non-Twin.PNG

1-Visitor
November 2, 2010

Here is a worksheet you might be intrested in. Found in the old collab posted by Jean.

Mike

lvl10720-TurquoiseAuthor
20-Turquoise
November 2, 2010

I have still one more extra question and wish to learn.

P.PNG Twin_NonTwin_Merge.PNG

Thanks in advance.

Loi.

1-Visitor
November 2, 2010

Like the attached?

Just a word of advice. If somebody posts an answer to the original question don't ask another question and discard the answer. You have asked a question which is a variation to the original thread and created a new Mathcad document without the function supplied by Richard or Stuart.

If you keep all posted functions in the worksheet, all collabs can track the progress of the thread by downloading the latest file.

Mike