Cpre is a project mainly written in Ruby, it's free.
Cpre do given :x => 2..Float::INFINITY select do (1..x).select { |i| i != 1 && i != x }.all? { |i| x % i != 0 } end make { x } end.first(10)
Cpre { given :x, 2..Float::INFINITY given :y { |x| 1..x } select { |x, y| x % y == 0 } group_by :x select { |x, group| group.length == 2 } collect { |x| x } }.first(10)