Write the shortest code to print sexy primes till
Sexy Primes are pairs of numbers
(n, m) such as
m both are prime, and
m = n + 6.
Modifying the question a little bit after reading Howard's comment.
- Create a function which will take an integer
- Check for sexy primes from 0 to that integer
- The function must return an array of arrays, e.g.
listSexy(30)must return [[5,11], [7,13], [11,17], [13,19], [17,23], [23,29]]