fork(1) download
  1. require'mathn'
  2. n=gets.to_i
  3. a=1
  4. (a+=2;a.prime?&&(a+2).prime?&&n-=1)while n>0
  5. $><<"#{a}, #{a+2}"
  6.  
Success #stdin #stdout 0.03s 7852KB
stdin
3
stdout
11, 13