Generate Sexy Primes Sexy Primes are pairs of numbers \$(n, n+6)\$ such as \$n\$ and \$n+6\$ are both prime
You need to create a function which will take an integer, check for sexy primes from 0 to that integer, and return an array of arrays.
For example, listSexy(30) must return [[5,11], [7,13], [11,17], [13,19], [17,23], [23,29]] or some equivalent.
This is code-golf so the program with the shortest bytecount wins!
MATLAB 32

i=1:n;i(isprime(i)&amp;isprime(i+6))


n is your number