Sha256: 44373a2fe4e9b3293d53023175deb4297a18eaa49eb27e2283d7dd93b6ec121d

Contents?: true

Size: 164 Bytes

Versions: 14

Compression:

Stored size: 164 Bytes

Contents

# coding: utf-8
class Integer
  def breeder?(b)
    a = self
    x = (a.σ - a).fdiv(b)
    abx = a + (b*x)
    (abx == a.σ) and (abx == b.σ * (x + 1))
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
numb-0.152.0 lib/numb/breeder.rb
numb-0.138.0 lib/numb/breeder.rb
numb-0.125.0 lib/numb/breeder.rb
numb-0.114.0 lib/numb/breeder.rb
numb-0.111.0 lib/numb/breeder.rb
numb-0.109.0 lib/numb/breeder.rb
numb-0.99.0 lib/numb/breeder.rb
numb-0.96.0 lib/numb/breeder.rb
numb-0.89.0 lib/numb/breeder.rb
numb-0.84.0 lib/numb/breeder.rb
numb-0.77.0 lib/numb/breeder.rb
numb-0.72.1 lib/numb/breeder.rb
numb-0.72.0 lib/numb/breeder.rb
numb-0.68.0 lib/numb/breeder.rb