Sha256: 0995a034ce06b4860c05199a66bac58c1efe843efd96c73a020a48cd0ef715f6
Contents?: true
Size: 315 Bytes
Versions: 16
Compression:
Stored size: 315 Bytes
Contents
# coding: utf-8 class Integer def mobius case when (self < 1) then nil when (square_free? and number_of_distinct_prime_factors.even?) then 1 when (square_free? and number_of_distinct_prime_factors.odd?) then -1 when (not square_free?) then 0 end end end
Version data entries
16 entries across 16 versions & 1 rubygems