# is_prime

Is the given number a prime number?

Follow me on Twitter or Github for more info and updates.

## How to use

```
require "is_prime"
3.prime? # => true
4.prime? # => false
```

## What algorithm is being used?

The implementation is just one line.

```
('1' * N) !~ /^1?$|^(11+?)\1+$/
```

Read more about it here.

## How to install

```
[sudo] gem install is_prime
```

## Requirements

*is_prime* is tested in Mac OS X 10.6.6, 10.6.7 using Ruby 1.8.7, 1.9.2.

## License

*is_prime* is released under the *MIT license*.