Write the shortest code to print sexy primes till n
Sexy Primes are pairs of numbers (n, m) such as n and m both are prime, and m = n + 6.
EDIT
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]]