RosettaCodeData/Task/Sexy-primes/00-TASK.txt

27 lines
1.9 KiB
Plaintext

In mathematics, '''sexy primes''' are prime numbers that differ from each other by six.
For example, the numbers '''5''' and '''11''' are both sexy primes, because '''11''' minus '''6''' is '''5'''.
The term "sexy prime" is a pun stemming from the Latin word for six: ''sex''.<br><br>
'''Sexy prime pairs:''' Sexy prime pairs are groups of two primes that differ by '''6'''. e.g. '''(5 11), (7 13), (11 17)'''<br>
See sequences: [[OEIS:A023201]] and [[OEIS:A046117]]<br><br>
'''Sexy prime triplets:''' Sexy prime triplets are groups of three primes where each differs from the next by '''6'''. e.g. '''(5 11 17), (7 13 19), (17 23 29)'''<br>
See sequences: [[OEIS:A046118]], [[OEIS:A046119]] and [[OEIS:A046120]]<br><br>
'''Sexy prime quadruplets:''' Sexy prime quadruplets are groups of four primes where each differs from the next by '''6'''. e.g. '''(5 11 17 23), (11 17 23 29)'''<br>
See sequences: [[OEIS:A023271]], [[OEIS:A046122]], [[OEIS:A046123]] and [[OEIS:A046124]]<br><br>
'''Sexy prime quintuplets:''' Sexy prime quintuplets are groups of five primes with a common difference of '''6'''. One of the terms must be divisible by '''5''', because '''5''' and '''6''' are relatively prime. Thus, the only possible sexy prime quintuplet is '''(5 11 17 23 29)'''<br><br>
;Task:
::*For each of pairs, triplets, quadruplets and quintuplets, Find and display the count of each group type of sexy primes less than one million thirty-five ('''1,000,035''').
::*Display at most the '''last''' '''5''', less than one million thirty-five, of each sexy prime group type.
::*Find and display the count of the unsexy primes less than one million thirty-five.
::*Find and display the '''last 10''' unsexy primes less than one million thirty-five.
::*Note that 1000033 '''SHOULD NOT''' be counted in the pair count. It is sexy, but not in a pair within the limit. However, it also '''SHOULD NOT''' be listed in the unsexy primes since it is sexy.
<br><br>