Sha256: 8cf2b37464514dd621e8418ff5aaf1b806b272e9e7f3a6ecc055355ee6fd8c43
Contents?: true
Size: 138 Bytes
Versions: 8
Compression:
Stored size: 138 Bytes
Contents
class Integer def goldbach? return false unless even? and self > 2 downto(2).any?{|n| n.prime? and (self - n).prime?} end end
Version data entries
8 entries across 8 versions & 1 rubygems