Quantcast
Channel: PTC Community: Message List
Viewing all articles
Browse latest Browse all 11560

Re: How to Extract Non-overlap Triplets

$
0
0

Use the output of PrimeTriplet as input. Run from the second to the last but one element and remove every triple where one of its numbers are included in the next triple. A function overlap(triple1, triple2) may be useful in doing so.

 

Alternative approach: lookup the prime before the first and the prime after the last element of your triple. If the difference of any of them to the center element of the triple is 6, discard it.


Viewing all articles
Browse latest Browse all 11560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>