re: Write a script to find permutable prime numbers VIEW POST

VIEW FULL DISCUSSION
 

Ruby✨💎✨

require 'prime'
require 'set'

Prime.take_while {|n| n < 1000 }.to_set.yield_self {|ps| ps.select {|n| ps.superset?(n.digits.permuta
tion.map(&:join).map(&:to_i).to_set) } }
code of conduct - report abuse