https://github.com/jdan/oeis
On-Line Encyclopedia of Integer Sequences gem
https://github.com/jdan/oeis
Last synced: 10 months ago
JSON representation
On-Line Encyclopedia of Integer Sequences gem
- Host: GitHub
- URL: https://github.com/jdan/oeis
- Owner: jdan
- Created: 2012-02-17T06:08:32.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2013-02-22T22:28:24.000Z (over 13 years ago)
- Last Synced: 2025-08-12T05:26:34.621Z (10 months ago)
- Language: Ruby
- Homepage:
- Size: 113 KB
- Stars: 16
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OEIS
## About
This a gem to interface the [On-Line Encyclopedia of Integer Sequences](http://oeis.org)
(OEIS). It allows you to search for a documented sequence using a Ruby Fixnum Array as
input.
## Usage
> require 'oeis'
> ls = 3.upto(10).collect { |i| i*i }
[9, 16, 25, 36, 49, 64, 81, 100]
> result = OEIS::search(ls)
> p result.title
The squares: a(n) = n^2.
> p result.id
A000290
> p result.sequence
[0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100 ...
## Installation
git clone git@github.com:prezjordan/oeis.git
cd oeis
bundle
gem build oeis.gemspec
gem install oeis-X.X.X.gem
**OR**
gem install oeis
## Why?
I started working on this gem after my roommate's snoring kept me from sleeping. It is my
first gem, so there's a *very* good chance I did something wrong, or did something
not-so-right.
Numbers have always been a passion of mine, so this servers as a simple educational tool.
Generating numbers is fun, seeing various properties of the numbers you just generated is
even cooler.
## LICENSE
Include license information here.