Sha256: 878d495a82654aa5e8a01cb80224e629ade11f4ab8aaec5964db8356fa56c497
Contents?: true
Size: 320 Bytes
Versions: 1
Compression:
Stored size: 320 Bytes
Contents
class Integer def highly_composite? return false if self > 6 and not (abundant? or primorial_product?) return true if [1,4,36].include?(self) n_divisors = number_of_divisors (self-1).downto(1).none? do |x| x.number_of_divisors >= n_divisors end end alias :julian? :highly_composite? end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
numb-0.152.0 | lib/numb/highly_composite.rb |