https://github.com/trizen/oeis-autoload
Use OEIS sequences as functions in computer programs.
https://github.com/trizen/oeis-autoload
Last synced: about 1 month ago
JSON representation
Use OEIS sequences as functions in computer programs.
- Host: GitHub
- URL: https://github.com/trizen/oeis-autoload
- Owner: trizen
- License: unlicense
- Created: 2023-09-16T10:28:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-06T22:10:29.000Z (almost 2 years ago)
- Last Synced: 2025-03-03T02:28:31.870Z (over 1 year ago)
- Language: Perl
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# oeis-autoload
**OEIS autoload** is a [Sidef](https://github.com/trizen/sidef) command-line tool and a library that implements support for using [OEIS](https://oeis.org) sequences as functions.
Usage example:
```console
$ sidef oeis.sf 'A060881(n)' 0 9 # display first 10 terms of A060881
```
Several other usage examples:
```console
$ sidef oeis.sf 'A033676(n)^2 + A033677(n)^2' # first 10 terms
$ sidef oeis.sf 'A033676(n)^2 + A033677(n)^2' 5 # 5-th term
$ sidef oeis.sf 'A033676(n)^2 + A033677(n)^2' 5 20 # terms 5..20
```
The ID of a [OEIS](https://oeis.org) sequence can be called like any other function:
```console
$ sidef oeis.sf 'sum(1..n, {|k| A000330(k) })'
$ sidef oeis.sf 'sum(0..n, {|k| A048994(n, k) * A048993(n+k, n) })'
```
The `OEIS.sm` library can also be used inside Sidef scripts, by placing it in the same directory with the script:
```ruby
include OEIS
say map(1..10, {|k| A000330(k) })
```