Skip to main content

A Python library that generates integer sequences

Project description

logo
license GitHub Repo stars GitHub forks PyPI

Mathseq


Mathseq is python library that helps to generate inifinite sequences real quick ..

Supported Sequences

  • Fibonacci

  • Lucas Number

  • Prime Number

    • end (Positional Argument)
  • Catalan Number

  • Vaneck's sequence

  • Composite Numbers

  • Pronic Numbers

  • Random sequence

    • seed
    • type
  • Look and say

    • inverse

Installation


Using pip

$ pip install mathseq

Usage


Imports

>>>from mathseq import seq

Create Objects

>>>from mathseq import seq
>>>
>>>fibonacci = seq.fibonacci()
>>>fibonacci
<generator object fibonacci at 0x0000020F83BEC648>
>>>

Iteration

from mathseq import seq

fibonacci = seq.fibonacci()

#printing through desired range
desired_range = 10
for _ in range(desired_range):
    fib = next(fibonacci)
    print(fib)


#keep generating to the infinity
for fib in fibonacci:
    print(fib)

Use List Comprehension

from mathseq import seq

fibonacci = seq.fibonacci()
catalan = seq.catalan_numbers()

fib_list = [next(fibonacci) for _ in range(10)]
cat_list = [next(catalan) for _ in range(10)]

print("List of Fibonacci Numbers",fib_list)
print("List of Catalan Numbers",cat_list)

License

MIT

Authors


Contributing

Contributions are always welcome!

See contributing.md for ways to get started.

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

mathseq-0.0.3.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mathseq-0.0.3-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file mathseq-0.0.3.tar.gz.

File metadata

  • Download URL: mathseq-0.0.3.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.0

File hashes

Hashes for mathseq-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6d191f8500b8de582cde466bba441cd3feebcc2d8040c80fa86113678d4209db
MD5 cf53ccbf160ae1e67bcd1b3ed3a09205
BLAKE2b-256 deea92cc691acef4db714941169e77ef27c092a2f2bb4cb3c1dcda167f4c3f4e

See more details on using hashes here.

File details

Details for the file mathseq-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: mathseq-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.5.0 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.0

File hashes

Hashes for mathseq-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8368eee3830cc92c50411b45bfa6158faa37c2cdbb03f8c4fd9415051a39fc89
MD5 b430ce26528317eed65922090cd222a5
BLAKE2b-256 0e4f124316524a7dbf370800b8f3f59356be7f951ea01c44ca47d5ebff10c5fb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page