Skip to content

EnriquePH/OEIS.R

Repository files navigation

R-CMD-check test-coverage codecov License: MIT GitHub stars

OEIS.R

Image

Access sequences from the On-Line Encyclopedia of Integer Sequences (OEIS) directly from R

OEIS is one of the world's most valuable mathematical resources: thousands of integer sequences with formulas, comments, references, and code. It has contributed to mathematical discoveries and is cited in over 6000 articles. OEIS.R brings this data to R in a structured way, making it easy to visualize, analyze, and use in mathematical hypotheses or contributions to OEIS.

Installation

# install.packages("devtools")  # if you don't have it
devtools::install_github("EnriquePH/OEIS.R")

Quick Start

Rlibrary(OEIS.R)
library(ggplot2)

# Download the Fibonacci sequence (A000045)
fib <- OEIS_sequence("A000045")

# Basic info
OEIS_description(fib)
OEIS_formula(fib)

# Quick plot (add your own image here after generating it!)
OEIS_plot(fib)

Another example: Sequence A001615

id <- "A001615"
x <- OEIS_sequence(id)

OEIS_ggplot(x) +
  geom_line() +
  geom_point(size = 0.5, color = "green") +
  labs(title = paste("OEIS", id, "-", OEIS_name(x)))

A001615 plot

Main Features

Download and parsing of OEIS sequences (terms, description, formula, offset, etc.). Seamless integration with ggplot2 for visualization. Helper functions:

  • OEIS_description()
  • OEIS_formula()
  • OEIS_keywords()

Respects OEIS terms of use (rate limiting recommended). Example Shiny app for interactive exploration.

Shiny App

Try the interactive demo: OEIS.R Shiny App

Useful Links

Contributing

Contributions are welcome! Feel free to open issues or pull requests for features like term-based search, caching, extended parsing, or vignettes.

Author

Enrique Pérez Herrero

Built with RStudio • Licensed under the MIT License

About

Data from The On-Line Encyclopedia of Integer Sequences in R

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages