provides many of the most famous sequences of the OEIS
Project description
sequences
This is a simple Mathematical Module which is simple to use. The module provides many of the most famous sequences from the On-Line Encyclopedia of International Sequences (OEIS) as Python Functions that returns a list of the first 'n' terms of that sequence. Help text is included for each function so that the user gets an idea of what to expect as the output to each function.
Examples of Functions provided
- whole(n)
0, 1, 2, 3, ..., n
- square(n)
0, 1, 4, 9, ..., pow(n, 2)
- prime(n)
2, 3, 5, 7, 11, ...
- fibonacci(n)
0, 1, 1, 2, 3, ..., sum([F(n-1), F(n-2)])
- tribonacci(n)
0, 1, 1, 2, 4, ..., sum([T(n-1), T(n-2), T(n-3)])
- recaman(n)
0, 1, 3, 6, 2, ...
T(n) = 0 if n == 0
T(n) = T(n-1) - n if positive and not already in sequence
T(n) = T(n-1) + n otherwise
And many more... Each function contains help text that can be accessed through help() in python to know more about it.
Updates (0.0.5)
Minor bug fixes
Updates (0.0.6)
Added many new sequences like:
- catalan(n)
1, 1, 2, 5, 14, ..., comb(2n, n) / (n+1)
- aronson(n)
1, 4, 11, 16, 24, ...
formally, these numbers are obtained from the index of english letter "T" or "t" in the sentence: "T is the first, fourth, eleventh, sixteenth, ... letter in this sentence." ignoring spaces and punctuation marks - cantral_polygon(n)
1, 2, 4, 7, 11, ..., (pow(n, 2) + n + 2) / 2
Reach out to me
If you face issues, contact me through my e-mail: knightt1821@gmail.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sequences-0.0.6.tar.gz
.
File metadata
- Download URL: sequences-0.0.6.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76d5febb21580e89ed7e71f3c1ca792d0816cce67c88bb249ce176537dbe26b4 |
|
MD5 | e896cb728b7180957d2ef7657defba20 |
|
BLAKE2b-256 | 1b2f74709be65c7ada64f4129c8319fe96686a0c2b947be98bddd91aa96dda5d |
File details
Details for the file sequences-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: sequences-0.0.6-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf15478b8ae8772d250c97dec6c78ca150bceab42a52302ffde5913587cf99d1 |
|
MD5 | 29d62e318c269ea58312921dfcea8c60 |
|
BLAKE2b-256 | 42db1d39b9edd61f7aa9fd45576d0a5b5a9f5161dc78eccdc108713f9e850e5a |