Sha256: c19de32c2778d1a6fc8f1d6cc2f1a377ea4fba21b1a7ca20c67d4f22b293ca39

Contents?: true

Size: 128 Bytes

Versions: 8

Compression:

Stored size: 128 Bytes

Contents

class Integer
  def primitive_roots
    return [] unless primitive_root?
    (0..self).select{|n| primitive_root?(n)}
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
numb-0.186.0 lib/numb/primitive_roots.rb
numb-0.185.0 lib/numb/primitive_roots.rb
numb-0.184.0 lib/numb/primitive_roots.rb
numb-0.181.0 lib/numb/primitive_roots.rb
numb-0.170.0 lib/numb/primitive_roots.rb
numb-0.152.0 lib/numb/primitive_roots.rb
numb-0.138.0 lib/numb/primitive_roots.rb
numb-0.125.0 lib/numb/primitive_roots.rb