Sha256: 63efc282e2e8f8bf7ffacdd138f17dbcdeb7d1e3608a9850805a411cad62bff4

Contents?: true

Size: 503 Bytes

Versions: 4

Compression:

Stored size: 503 Bytes

Contents

# coding: utf-8
describe Integer, "#smarandache" do
  # A002034
  @seq = [1,2,3,4,5,3,7,4,6,5,11,4,13,7,5,6,17,6,19,5,7,11,
          23,4,10,13,9,7,29,5,31,8,11,17,7,6,37,19,13,5,41,
          7,43,11,6,23,47,6,14,10,17,13,53,9,11,7,19,29,59,
          5,61,31,7,8,13,11,67,17,23,7,71,6,73,37,10,19,11,
          13,79,6,9,41,83,7]

  @seq.to_enum.with_index(1).each do |s, n|
    it "returns #{s} as the value of the Smarandache function for #{n}" do
      n.smarandache.should == s
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
numb-0.186.0 spec/numb/smarandache_spec.rb
numb-0.185.0 spec/numb/smarandache_spec.rb
numb-0.184.0 spec/numb/smarandache_spec.rb
numb-0.181.0 spec/numb/smarandache_spec.rb