A prime number and multiplication table generator.
The prime generator algorithm is an implementation of the method on ProgrammingPraxis programmingpraxis.com/2011/10/14/the-first-n-primes/ which was first described by Melissa O’Neill on The Genuine Sieve of Eratosthenes www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf.
-
Requires ruby 2.1+
$ git clone https://github.com/bbonamin/optimuss $ cd optimuss $ rake gem $ gem install pkg/optimuss-0.0.1.gem
-
To generate the 10 first prime numbers and print a multiplication table with all of them, run:
$ optimuss prime_table
-
To generate the N first prime numbers and print a multiplication table with all of them, run:
$ optimuss prime_table --primes N
-
To print the Nth prime number, run:
$ optimuss prime_at --position N
-
Fork it ( github.com/bbonamin/optimuss/fork )
-
Create your feature branch (+git checkout -b my-new-feature+)
-
Commit your changes (+git commit -am ‘Add some feature’+)
-
Push to the branch (+git push origin my-new-feature+)
-
Create a new Pull Request