2 replaced http://stackoverflow.com/ with https://stackoverflow.com/
source | link

PHP, 106 bytes

function p($n){for($i=$n;--$i&&$n%$i;);return$i-1;}for(;++$i<$argv[1]-5;)p($i)|p($k=$i+6)?:print"$i,$k\n";

program prints pairs as n,n+6 delimited by linebreaks. Run with -r.

I modified my is_prime functionis_prime function (& saved a byte) so that it returns 0 for primes to golf on the Elvis.

PHP, 106 bytes

function p($n){for($i=$n;--$i&&$n%$i;);return$i-1;}for(;++$i<$argv[1]-5;)p($i)|p($k=$i+6)?:print"$i,$k\n";

program prints pairs as n,n+6 delimited by linebreaks. Run with -r.

I modified my is_prime function (& saved a byte) so that it returns 0 for primes to golf on the Elvis.

PHP, 106 bytes

function p($n){for($i=$n;--$i&&$n%$i;);return$i-1;}for(;++$i<$argv[1]-5;)p($i)|p($k=$i+6)?:print"$i,$k\n";

program prints pairs as n,n+6 delimited by linebreaks. Run with -r.

I modified my is_prime function (& saved a byte) so that it returns 0 for primes to golf on the Elvis.

1
source | link

PHP, 106 bytes

function p($n){for($i=$n;--$i&&$n%$i;);return$i-1;}for(;++$i<$argv[1]-5;)p($i)|p($k=$i+6)?:print"$i,$k\n";

program prints pairs as n,n+6 delimited by linebreaks. Run with -r.

I modified my is_prime function (& saved a byte) so that it returns 0 for primes to golf on the Elvis.