Sha256: 7b5227c6546285eda88d7075e85a7c7b7e00ee2ae62c1ccbab6443a615e7ac42

Contents?: true

Size: 255 Bytes

Versions: 2

Compression:

Stored size: 255 Bytes

Contents

# coding: utf-8
class Integer
  def σe
    # TODO: If squarefree, the sum of a number’s e-divisors is the number
    # itself. Do we gain anything significant by special-casing this?
    e_divisors.reduce(:+)
  end

  alias :sum_of_e_divisors :σe
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
numb-0.152.0 lib/numb/sum_of_e_divisors.rb
numb-0.138.0 lib/numb/sum_of_e_divisors.rb