The On-Line Encyclopedia of Integer Sequences (OEIS), often referred to as Sloane's, is a comprehensive online database dedicated to integer sequences. This CLI tool leverages the power of cheat.sh to provide quick access to OEIS data directly from your terminal.
You can easily search for OEIS sequences by providing a sample of the sequence. This is particularly useful when you have a set of numbers and want to identify the corresponding mathematical sequence.
# Find all possible OEIS sequences for a given sequence (e.g., 1,1,1,1...)
curl cheat.sh/oeis/1+1+1+1
Once you have identified a sequence, you can get a detailed description of it. This includes its definition, properties, and related information.
# Describe a specific OEIS sequence (e.g., A2)
curl cheat.sh/oeis/A2
For developers, it's often helpful to see how a sequence is implemented in various programming languages. This tool can fetch code snippets for popular languages.
# Get the implementation of the A2 OEIS sequence in Python
curl cheat.sh/oeis/A2/python
If you're unsure which programming languages are available for a specific OEIS sequence, you can list all supported implementations.
# List all available implementations of the A2 OEIS sequence
curl cheat.sh/oeis/A2/:list